Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL With Date
Message
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Divers
Thread ID:
00792639
Message ID:
00792675
Vues:
10
Is the column DateIn a datetime column? The datetime datatype has a time component that goes to the ms. When you supply a date literal, such as '20030505', SQL Server assumes that the time component is 00:00:00 or midnight.

-Mike

>Dear All,
>
>Am I missing somthing with this SQL statment:
>
>Dim myAttendanceSql As String = "SELECT * FROM AN_CheckInOut WHERE Mem_EmpID = '" & Trim(Me.txtID.Text) & "' AND DateIn = " & Date.Today
>Dim myAttendanceDA As New SqlDataAdapter(myAttendanceSql, myConn.oAdoNetSql_Conn)
>Dim myAttendanceCB As New SqlCommandBuilder(myAttendanceDA)
>
>
>It return 0 rows if I included the date in the query. and no errors!
>
>I am using SQL2000 MSDE.
>
>Thanks for the help.
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform