Search Results

Search found 18661 results on 747 pages for 'linq to mysql'.

Page 78/747 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Query a List of List of Items in LINQ c#

    - by call me Steve
    I am a bit new to LINQ, here is my problem. I have a List of List of Items I like to get the Items which are present in only one List (and if I could get the List in which they are without re-iterating through the "list of list" that would be great). I am trying without success to use the Aggregate / Except / Group keywords in the Linq query but nothing close to a solution so far.

    Read the article

  • LINQ expression until to break a string

    - by wonea
    Using LINQ I'm looking to break down the following path string[], however I'd like to break it up to the point of the Binn folder. Is there a WHERE UNTIL operator in LINQ? c:\ Program Files\ Microsoft SQL Server\ MSSQL10.SQLEXPRESS\ MSSQL\ Binn\ sqlservr.exe What I'd like todo var words = from word in thepath where UNTIL thepath == "Binn" select word;

    Read the article

  • How to get datarow array refering to datatable 's field value with linq

    - by Michael
    I want to use linq to get datarow array from a datatable which its string type ColumnA is not null or depending on its length 0 , so I can get the row index with Indexof() method to deal with something else. ColumnA ColumnB ColumnC A0 B0 C0 Null B1 C1 A2 B2 C2 Null B3 C3 My Linq Statment: DataRow[] rows = myDataTable.Select("ColumnA is not null").Where(row=>row.Field<string>("ColumnA").Length>0); somebody who can help?

    Read the article

  • Translate Linq Expression to any existing Query structure?

    - by fredlegrain
    I have some kind of "data engine" between multiple "data consumer" processes and multiple "data storage" sources. I'd like to provide Linq capabilities to the "data consumer" and forward the query to the "data storage". The forwarded query should be some structured query (like, let's say, NHibernate Criteria). Is there any existing structured query library that could allow me to "just" translate a Linq Expression to such a structured query?

    Read the article

  • how to bind gridview through linq

    - by Manoj Wadhwani
    I am using linq to sql Currently i am binding gridviw through linq which query written in business logic call . i have extract record through query in business logic class and i want to bind that particular data to gridviw and return data . how to retrun data which type is array. code is mention below: CMSBusiness.DataClasses1DataContext db = new DataClasses1DataContext(); var cate = from p in db.categoryTables select new { categoryId=p.categoryId, categoryName=p.categoryName, categoryDesc=p.categoryDesc }; how to return value and bind gridview , Please suggest

    Read the article

  • LINQ nested joins

    - by ace
    Im trying to convert a SQL join to LINQ. I need some help in getting the nested join working in LINQ. This is my SQL query, Ive cut it short just to show the nested join in SQL: LEFT OUTER JOIN dbo.TaskCommentRecipient RIGHT OUTER JOIN dbo.TaskComment ON dbo.TaskCommentRecipient.TaskCommentID = dbo.TaskComment.TaskCommentID ON dbo.Task.Taskid = dbo.TaskComment.TaskCommentTaskId

    Read the article

  • Search by Letters using LINQ

    - by Biswo
    hi i m using Linq & C# and i want to filter my data as this syntax in Sql Syntax in sql is I hav one table name Customer in which name is field 'Select name from customer where name like 'C%'' can u help to solve this code in Linq

    Read the article

  • how to specify literal value in linq union

    - by lowlyintern
    I have the following SQL query, note I want the literal value '0' in the second field in the second SELECT statement from the ItemSale table. How do I express this in LINQ? I get the error message 'Invalid anonymous type member declarator'. SELECT BranchNumber,QuantitySold FROM Department UNION SELECT BranchNumber,0 FROM ItemSale How to express the '0' in LINQ? var unionQuery = (from dept in Department select new { dept.BranchNumber, dept.QuantitySold, }) .Concat(from item in ItemSale select new { item.BranchNumber, 0 });

    Read the article

  • .Net Linq - Join together all item of a List

    - by Melursus
    How can I write a Linq expression that select item from a List and join them together ? Example IList<string> data = new List<string>(); data.Add("MyData1"); data.Add("MyData2"); string result = //some linq query... I try data.Select(x => x + ","); //result = "MyData1, MyData2"

    Read the article

  • How do linq Last() work?

    - by acidzombie24
    I dont understand how current can be null and last can be an object while last being a LINQ function. I thought last uses GetEnumerator and keeps going until current == null and returns the object. However as you can see the first GetEnumerator().Current is null and last somehow returns an object. How do linq Last() work? var.GetEnumerator().Current var.Last()

    Read the article

  • Data access layer using Linq to SQL

    - by Andrei Tanasescu
    I am building a c# - linq - sql server winforms/asp.net application, accessing a database. I would like my business logic layer to be easily testable, and that means not littering it with Linq database queries everywhere. What design patterns/ best practices are available for the following use cases - inserting/updating a new object - searching for an object - loading a bunch of related data into a sort of "presentation" object that could be displayed by various views ?

    Read the article

  • LINQ - joining multiple lists

    - by kristian
    I've looked at the 101 Linq Samples here but I can't see anything like this in that list. If I'm just not seeing a relevant example there, please link to it. If I have these 3 classes: class Student { int id; string name } class Course { int id, string name } class Enrolment { int studentId; int courseId; } How would I use LINQ to get a list of courses a student is enrolled on? (assume I have an IList of all three classes)

    Read the article

  • Linq to XSD processing

    - by goel
    For Typed Xml to Linq processing ,do i need to download Linq to XSD alpha installer or is it available in VS 2008 ? (I am using VS 2008 Professional edition).

    Read the article

  • Cast problem with LINQ

    - by yigit
    I'm tring to get my product's types to a list with Linq. var types = (from t in NHibernateSession.Linq<Product>() select t.Type).Distinct().ToList<Type>(); return types; But its giving an Unable to cast object of type error '...Domain.Product' to type '...Domain.Type'. Please tell where am I going wrong.

    Read the article

  • Strange Play Framework 2.2 exceptions after trying to add MySQL / slick

    - by Mike Cialowicz
    I'm working on a Play 2.2 application, and things have gone a bit south on me since I've tried adding my DB layer. Below are my build.sbt dependencies. As you can see I use mysql-connector-java and play-slick: libraryDependencies ++= Seq( jdbc, anorm, cache, "joda-time" % "joda-time" % "2.3", "mysql" % "mysql-connector-java" % "5.1.26", "com.typesafe.play" %% "play-slick" % "0.5.0.8", "com.aetrion.flickr" % "flickrapi" % "1.1" ) My application.conf has some similarly simple DB stuff in it: db.default.url="jdbc:mysql://localhost/myDb" db.default.driver="com.mysql.jdbc.Driver" db.default.user="root" db.default.pass="" This is what it looks like when my Play server starts: [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 (Server started, use Ctrl+D to stop and go back to the console...) [info] Compiling 1 Scala source to C:\bbq\cats\in\space [info] play - database [default] connected at jdbc:mysql://localhost/myDb [info] play - Application started (Dev) So, it appears that Play can connect to the MySQL DB just fine (I think). However, I get this exception when I make any request to my server: [error] p.nettyException - Exception caught in Netty java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurren t/ExecutionContext; at play.core.Invoker$.<init>(Invoker.scala:24) ~[play_2.10.jar:2.2.0] at play.core.Invoker$.<clinit>(Invoker.scala) ~[play_2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$Implicits$.defaultContext$lzycompu te(Execution.scala:7) ~[play_2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$Implicits$.defaultContext(Executio n.scala:6) ~[play_2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$.<init>(Execution.scala:10) ~[play _2.10.jar:2.2.0] at play.api.libs.concurrent.Execution$.<clinit>(Execution.scala) ~[play_ 2.10.jar:2.2.0] The odd thing is that the 2nd request (to the exact same URL, same controller, no changes) comes back with a different error: [error] p.nettyException - Exception caught in Netty java.lang.NoClassDefFoundError: Could not initialize class play.api.libs.concurr ent.Execution$ at play.core.server.netty.PlayDefaultUpstreamHandler.handleAction$1(Play DefaultUpstreamHandler.scala:194) ~[play_2.10.jar:2.2.0] at play.core.server.netty.PlayDefaultUpstreamHandler.messageReceived(Pla yDefaultUpstreamHandler.scala:169) ~[play_2.10.jar:2.2.0] at com.typesafe.netty.http.pipelining.HttpPipeliningHandler.messageRecei ved(HttpPipeliningHandler.java:62) ~[netty-http-pipelining.jar:na] at org.jboss.netty.handler.codec.http.HttpContentDecoder.messageReceived (HttpContentDecoder.java:108) ~[netty-3.6.5.Final.jar:na] at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:29 6) ~[netty-3.6.5.Final.jar:na] at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessage Received(FrameDecoder.java:459) ~[netty-3.6.5.Final.jar:na] The URL / controller that I'm requesting just renders a static web page and doesn't do anything of any significance. It was working just fine before I started adding my DB layer. I'm rather stuck. Any help would be greatly appreciated, thanks. I'm using Scala 2.10.2, Play 2.2.0, and MySQL Server 5.6.14.0 (community edition).

    Read the article

  • Disable mysql startup in Ubuntu 10.04

    - by Bryan
    Hi all, I want to prevent mysql from starting in ubuntu 10.04 I have used update-rc.d -f mysql remove and confirmed that there is no link to the /etc/inid.d/mysql script from any of the rc?.d directories. I also ran sysv-rc-conf and it shows me that mysql is being called as part of the rc.d scripts. It is still starting on boot. How do I disable it? Regards, Bryan

    Read the article

  • problem importing data into older mysql version

    - by conandor
    I dump data from MySQL version 5.1.30 from server 1 # mysqldump mydb1 > mydb1.sql Then I import it to server 2 which have MySQL version 5.1.24-rc However I got an error important halfway. # mysql mydb1 < mydb1.sql ERROR 1064 (42000) at line 1984: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''9012345678' at line 1 Any idea how I can solve it?

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >