TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
moon lal
NA
1
0
Error in select statement in C# code.
Jun 13 2009 8:43 PM
Hello Friends, Rite now i am developing an application for maintaining employee login,logout information. I am using a select statement where the condition is userid & systemtime. below is the code. sqlcommand="SELECT timein1,curstatus FROM report WHERE userid=" + userID; sqlcommand += " and [date1]="; sqlcommand+=System.DateTime.Today; commandSelect.CommandText = sqlcommand; readerSelect = commandSelect.ExecuteReader(CommandBehavior.CloseConnection); This is the exception iam getting. Regards, moon0315 ex = {"Syntax error (missing operator) in query expression 'userid=31 and [date1]=6/13/2009 12:00:00 AM'."} I have spent almost 7 hrs in figuring out the error.but no use. i guess the error is in system.datetime.today; Rite now i am clueless.. It would be so great if some one helps me... Pls help me..
Reply
Answers (
2
)
Picturebox -working with high resolution image
How can i change label text in main form, when a button in second form is clicked?