iamareplicant
Programmer
Experts,
I am using ADO (2.6) to insert into an Oracle backend from an Access 2000 module using VBA.
However, I cannot get a date to insert properly, and I have tried formating the date with every combo i can think of.
The date field inside of the oracle table reads '1/1/1920' or some such garbage no matter what I try.
Here is my code snippet with junk values to get an idea of the code I am using:
I then execute the statement without error (all fields except the date get correctly inserted) but the date in the Oracle table reads goofy.
If I use a pass-thru query to run the identical SQL statement, it works as it should.
In my VBA code, I have tried '1/1/2007', '#1/1/2007#' and every combo of ticks, #'s and different formatted dates, and cannot get the date into the Oracle table...
Help would be appreciated....
TIA,
JBG
I am using ADO (2.6) to insert into an Oracle backend from an Access 2000 module using VBA.
However, I cannot get a date to insert properly, and I have tried formating the date with every combo i can think of.
The date field inside of the oracle table reads '1/1/1920' or some such garbage no matter what I try.
Here is my code snippet with junk values to get an idea of the code I am using:
Code:
...
dim strSQL as string
....
...strSQL = "INSERT INTO tblX(val1, val2) VALUES(1,'1-Dec-2007')
.....
...cmd.execute(strSQL)
I then execute the statement without error (all fields except the date get correctly inserted) but the date in the Oracle table reads goofy.
If I use a pass-thru query to run the identical SQL statement, it works as it should.
In my VBA code, I have tried '1/1/2007', '#1/1/2007#' and every combo of ticks, #'s and different formatted dates, and cannot get the date into the Oracle table...
Help would be appreciated....
TIA,
JBG