Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with SQL Insert DATE using C++ into MSAccess

Status
Not open for further replies.

Declare01

Programmer
Jun 9, 2006
2
CA
Hello, I have a stubborn problem in that I am converting the database for a system from Oracle to Microsoft Access 2003.

In doing this, some SQL statements need to be changed. My problem is in writing a record to Access that contains a DATE field. I am able to successfully write a record that doesn't contain a DATE field proving everything else is setup properly. I have tried many, many combinations for the SQL string with no success. Can someone please provide an actual working solution?

I am using an ADO connection to the .mdb file.

Here is the Microsoft VC++ 6.0 SQL code:

"INSERT INTO my_table (user_id, password, timestamp, tran_type, tran_data) VALUES ('name', 'password', #2006-01-01#, 'ab', 'abc')"

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top