Article ID: 207700
Article Last Modified on 7/15/2004
SQLPrepare:
INSERT INTO "dbo"."tblTimeTest" VALUES (?)
SQLBindParam:
12:35:00
Microsoft SQL Server then converts the value 12:35:00 to the following:
1899-12-30 12:35:00.00When you run a query in which the Criteria row for the Time field contains a literal value such as #12:35:00 PM# against this linked table, the SQL Server ODBC driver sends the following command to the SQL Server:
SQLExecDirect:
SELECT "dbo"."tblTimeTest"."TimeTest" FROM "dbo"."tblTimeTest" WHERE _
("TimeField" = {t '12:35:00'})
Field: TimeField Criteria: [Enter Time]For additional information about the query-by-form technique, please click the article number below to view the article in the Microsoft Knowledge Base:
209645 ACC2000: How to Use the Query-by-Form (QBF) Technique
Expr1: CVDate(Format([<Name of Time Field>],"hh:mm:ss AM/PM"))
create table tblTimeTest (ID int, TimeField datetime) go create unique index tblTimeTest_ndx on tblTimeTest (ID)
ID TimeField
-- ----------
1 12:35:00
Query: qryTest
-------------------------
Type: Select Query
Field: ID
Table: dbo_tblTimeTest
Field: TimeField
Table: dbo_tblTimeTest
Criteria: #12:35:00#
Additional query words: linking attaching prb attach attached
Keywords: kbinterop kbprb KB207700