iamareplicant
Programmer
Experts,
I am trying to update a linked Oracled table in my 2003 Access db. For testing, I created a pass-thru query that runs the SQL statement perfectly.
However, when I run the SQL statment from an ADODB command object, the date field in Oracle stores "1/1/1920 5:00 am".
Here is the SQL statement that I am trying to run via ADODB:
Here is the ADODB snippet that runs the above SQL statement. Because I am running multiple SQL statements within a transaction, I stored the SQL statements in the array varSQL():
To be clear, the SQL statement in the first part of this post is from a pass-thru query that works.
When it is run with the command object, it fails. Several other SQL statements within varSQL() that run before it run fine. I have tried to rearrange the order of the SQL statements that get run via the command object, I have tried to format the date other than "dd-mmm-yyyy" and I am at a loss as how to get an update (or insert) into my linked Oracle table that contains a date.
Any thoughts would be greatly appreciated. I am open for cheap work arounds at this point
JBG
I am trying to update a linked Oracled table in my 2003 Access db. For testing, I created a pass-thru query that runs the SQL statement perfectly.
However, when I run the SQL statment from an ADODB command object, the date field in Oracle stores "1/1/1920 5:00 am".
Here is the SQL statement that I am trying to run via ADODB:
Code:
UPDATE EDGE_MAIN.EDGE_COURSE_SECTION SET
COURSE_START_DT = '01-Jan-2005',
COURSE_END_DT = '01-Jan-2005'
WHERE (COURSE_ID=22) AND (SPECIALTY_ID = 5) And (SKILLTRAC_ID = 2) AND (MODULE_ID = 115)
Here is the ADODB snippet that runs the above SQL statement. Because I am running multiple SQL statements within a transaction, I stored the SQL statements in the array varSQL():
Code:
cmd.CommandType = adCmdText
For x = 0 To UBound(varSQL)
cmd.CommandText = varSQL(x)
cmd.Execute lngRecsAffected
Next
To be clear, the SQL statement in the first part of this post is from a pass-thru query that works.
When it is run with the command object, it fails. Several other SQL statements within varSQL() that run before it run fine. I have tried to rearrange the order of the SQL statements that get run via the command object, I have tried to format the date other than "dd-mmm-yyyy" and I am at a loss as how to get an update (or insert) into my linked Oracle table that contains a date.
Any thoughts would be greatly appreciated. I am open for cheap work arounds at this point
JBG