Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
SQL Query working with C Sharp for sqlite does not work
Danish Habib
Oct 21 2015 9:45 AM
502
Reply
I have a desktop application in which i have used c sharp with SQL server the below query fetches the data from the database when i am using the sql server as database but when i used sqlite database the below query does return nothing .
tell me is there any different in writing inline queries in c sharp for sql and sqlite , or does the MAX or like function works differently in SQL and SQLITE below is my query
com.CommandText = "SELECT MAX(DocumentCode) AS DocumentCode FROM DocumentsHeader WHERE (DocumentCode LIKE @DocumentCode + '%')";
com.Parameters.Add("@DocumentCode", SqlDbType.NVarChar, 18).Value = Passvalue.ToString().Trim();
returnvalue = com.ExecuteScalar();
This query fetches record when using sql and when using sqlite it does nt fetching record while i check that my Db has the record .
any one can assists me ...
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
snapshot of active screen
What is explicit keyword in c# ?