problem with databaseconnectivity in webservices
-
hi this is RK iam working with webservics in asp.net in that iam trying to use databaseconnectivity iam passing this query in dataadopter " select dtlastupdated,dblvalue from dbo.tblPerodicTickerData where dtDateTime = between 2007-03-28 11:35:09.000 a.m And 2007-04-09 11:40:05.000 a.m" while using this websrvice in asp.net page iam getting the error like this "System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'between'." whAT DO I DO TO RECTIFY THIS ERROR COULD U PLEASE KINDLY HELP ME OK BYE
-
hi this is RK iam working with webservics in asp.net in that iam trying to use databaseconnectivity iam passing this query in dataadopter " select dtlastupdated,dblvalue from dbo.tblPerodicTickerData where dtDateTime = between 2007-03-28 11:35:09.000 a.m And 2007-04-09 11:40:05.000 a.m" while using this websrvice in asp.net page iam getting the error like this "System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'between'." whAT DO I DO TO RECTIFY THIS ERROR COULD U PLEASE KINDLY HELP ME OK BYE
Change your select to: select dtlastupdated,dblvalue from dbo.tblPerodicTickerData where dtDateTime between '2007-03-28 11:35:09.000' And '2007-04-09 11:40:05.000' And I think it will work. There is no = between and I removed the a.m and put quotes around the datetime values. Hope that helps. Ben
-
Change your select to: select dtlastupdated,dblvalue from dbo.tblPerodicTickerData where dtDateTime between '2007-03-28 11:35:09.000' And '2007-04-09 11:40:05.000' And I think it will work. There is no = between and I removed the a.m and put quotes around the datetime values. Hope that helps. Ben
yes it is working thak u very much rightfrom morning onwards iam suffering with this problem once thank u very much