CAST ISINGLERESULT TO IENUMERABLE
Any help would be much appreciated. Please help Client code: Have you tried what I have suggested? DataSource How can I change the code above? However, if you know your stored procedure returns a object already in your system, for example GetCustomer might return a row from your Customer table, then you can use that object as the generic type — ISingleResult. Read the question carefully. Open a new thread. I will delete you “solution2”, since it is not a solution:
Cannot implicitly convert type ‘string’ to ‘System. So, you can try the following: Do you need your password? Once the result has been returned, it is converted into a ISingleResult, which implements IEnumerable, and returned to the calling client. Read the question carefully. Then there will be a problem with a method returning ISingleResult. Sign up using Email and Password.
This means that we can do more advanced queries solely in the database without having to bring everything in memory to perform the same task. Read the question carefully. Linq and SQL stored procedure calling problem. I’m trying to display a list coming from my database using Linqtosql but I guess I’m making it wrong.
Cannot implicitly convert type ‘eResult – -datasource
I’m sorry, I have another question: The BLL code returns onle one object and not a list of objects. Object’ to type ‘System. Add your solution here. DataBind ; And Procedure Is: Object of type ‘System. This email is in use.
Regarding 3 tier app and Stored Procedure.
To access one of the set of results, you need to explicitly request it using the GetResult method. Firstly, in your client code you will have to manually convert the result to something like ToList if you want to bind the objects to a data source. Store procedure with linq, conversion problem. Code On BLL is: Other advantages of functions is that they can be executed against the database, inline with an existing linq to sql query. String’ I am not sure what field is having the issue.
If the stored procedure accepts parameters, then these will be translated into parameters on the method. I will delete you “solution2”, since it is not a solution: Chances are they have and don’t get it. If this returns a dataset then you will have to change datatable to dataset, then index the table of the dataset. So, you can try the following: Provide an answer or move on to the next question. Open a new thread. Arun kumar Gauttam Feb 8: Here is the code; the error occurs at line 8.
Understand that English isn’t everyone’s first language so be lenient of bad spelling and grammar. Arun kumar Gauttam Mar 4: If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem.
Use can get you data like this. This email is in use. An explicit conversion exists are you missing a cast? DataSource How can I change the code above?
Store procedure with linq, conversion problem
DataBind ; so i want that, 1. Cannot implicitly convert type ‘System. There are number of ways you can return a stored proc results User Defined Functions Like stored procedures, user defined functions can be added as a method on your data context.
Post as a guest Name.
linq with store procedure using 3 tier
Hi, How can I pass null values to a system. Unable to cast object of type ‘System. Existing Members Sign in to your account. This is the exception you should get. The next important izingleresult is the GetCurrentMethod which allows Linq to access the method to execute.
Its all about coding!
DataRowView’I have two repeaters: Sign up or log in Sign up using Google. Treat my content as plain text, not as HTML. The method code for CustOrderHis stored procedure would be: David Qian Microsoft Online Community Support Please remember to mark the replies as answers if they help and unmark them if they provide no help.