|
-
February 5th, 2000, 03:14 AM
#1
insert statement with dates
If I have a table called events with two fields: id and date, where id is a number and date (is a general date) and has an input mask that looks like '99/99/00;0;_ , how can I insert a record into the table using SQL?
i.e. shouldn't the following work:
Dim Conn As New ADODB.Connection
Conn.Open "dsn=dsRef"
Conn.Execute ("insert into events (id, date) values (8, #01/01/00#)")
-----------
My error is 'syntax error in INSERT INTO statement'. Maybe I am overlooking something obvious? Any insight would be appreciated!
Much thanks,
msl
-
February 5th, 2000, 11:57 PM
#2
Re: insert statement with dates
Use the following:
Conn.Execute ("insert into events (id, date) values (8, '01/01/00')")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|