Hello,
I am learning VB2005
How can i insert a date (with a variable date) in an existing table (MSAccess)
dim varDate as date
dim cmd as oledbcommand
cmd= new oledbcommand
cmd.connection=con
cmd.commandtext=" insert into MaTable (date) values (" & varDate & ")" ----> does not work !!!
cmd.commandtext=" insert into MaTable (date) values ('" & varDate & "')" ----> does not work !!!
cmd.commandtext=" insert into MaTable (date) values (#" & varDate & "#)" ---> does not work !!!
cmd.executenonquery
Thanks for your help .
!--removed tag-->
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).