Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error in sql statement ?
Message
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01145673
Message ID:
01145701
Views:
21
Don't you also need quotes around dates:
lcSQL = lcSQL + " and isblock=0 and BeginTime beween '" + lcStartDate + "' and '" + lcEndDate + "'"
>I trying to execute the following statement, when the exception is catched, I have displayed what the variable lcSQL evaulates to
>
>lcSQL = "select count(meetingnumber) from meetings where iscancelled=0 and roomclosed=0
>lcSQL = lcSQL + " and isblock=0 and BeginTime beween " + lcStartDate + " and " + lcEndDate
>
>select count(meetingnumber) from meetings where iscancelled=0 and roomclosed=0 and isblock=0 and BeginTime beween 01/01/2006 00:00:00 and 12/31/2006 00:00:00
>
>
>I'm using VB.NET
>
>Any idea's what I'm missing.
>
>Thanks
>
>Kirk
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform