How to select first n characters using stored procedure
-
this works ok in sql server
SELECT MessageID, LEFT(Message, 80) AS Expr1 FROM MSGTble
but when i try to do it through stored procedure, my webform is giving me errorALTER PROCEDURE dbo.GetAllMessage AS SELECT MessageID, LEFT(Message, 80) AS Expr1 FROM MSGTble RETURN
saying "A field or property with the name 'Message' was not found on the selected data source." -
this works ok in sql server
SELECT MessageID, LEFT(Message, 80) AS Expr1 FROM MSGTble
but when i try to do it through stored procedure, my webform is giving me errorALTER PROCEDURE dbo.GetAllMessage AS SELECT MessageID, LEFT(Message, 80) AS Expr1 FROM MSGTble RETURN
saying "A field or property with the name 'Message' was not found on the selected data source."Remove the RETURN from your store proc.
Never underestimate the power of human stupidity RAH
-
Remove the RETURN from your store proc.
Never underestimate the power of human stupidity RAH
-
this works ok in sql server
SELECT MessageID, LEFT(Message, 80) AS Expr1 FROM MSGTble
but when i try to do it through stored procedure, my webform is giving me errorALTER PROCEDURE dbo.GetAllMessage AS SELECT MessageID, LEFT(Message, 80) AS Expr1 FROM MSGTble RETURN
saying "A field or property with the name 'Message' was not found on the selected data source." -
Hi, if the column is not there you should get the error as invalid column. Try to execute the procedure within sql query analyzer window and check whether it returns any value correctly. In the query analyzer window you have to type the procedure name and excute it and see. It looks to me this could be coding problem on your webform. regards ramke