By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,479 Members | 1,548 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,479 IT Pros & Developers. It's quick & easy.

ODBC Call Failed -

P: 1
I am triyng to access one Oracle database with Msaccess2003 by ODBC.
When i used one field date type in clause Where, I get Error.
I would like help

It is Code :
Expand|Select|Wrap|Line Numbers
  1. Dim wrkODBC As Workspace
  2. Dim conPubs2 As Connection
  3. Set wrkODBC = CreateWorkspace("NewODBCWorkspace", "Test", "test", dbUseODBC)
  4. Set conPubs2 = wrkODBC.OpenConnection("Connection2", , True, "ODBC;DRIVER={Microsoft ODBC for ORACLE};SERVER=xxxxx;UID=xxxxx;PWD=xxxxx;DSN=xxxxx")
  5. Set Rpec = conPubs2.OpenRecordset("SELECT * FROM CONTR WHERE [START_DATE] <=#1/1/2006# ",  dbOpenSnapshot)
Angelo Roberto- E_mail deleted - I am from Brazil
Thanks all
Jan 23 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 2,653
Hi, Angelo.

I guess Oracle SQL has other syntax of date constants. Try to wrap it in single quotes.
Expand|Select|Wrap|Line Numbers

P.S. Posting email address is prohibited by the site rules.
Jan 23 '08 #2

Expert Mod 15k+
P: 31,709
What are the characteristics of your [Start_Date] field. Your SQL is fine (syntax correct). All SQL engines support #m/d/y# format for dates (Literal DateTimes and Their Delimiters (#)).
Jan 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.