Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error in sql statement ?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01145673
Message ID:
01145701
Vues:
20
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform