Beginning VB 6For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I've a project which was connected with Oracle Database. But now I connected it to the MS Access but when I run the programme I'm getting Run Time Error:
-[Microsoft][ODBC Microsoft Access Driver] Undefined function 'to_char' in expression.-
I'm using the statement here:
rs.open "select sum(COLUMNNAME) from TABLENAME where to_char(DATE_FIELD_NAME, 'mon-yyyy') = 'Feb-2006'",con,....
Can someone help me how can we raise date_field from Access with this format?
This error occured because of syntax changes in Oracle and Access. If you have designed the application properly, you can use a different dll to Access database or else Write 2 sql statements for oracle, check the provider and select the SQL statement according to the provider.
Hi dpkbahuguna,
I seems you are going to maintain 2 sources for Oracle and Acces. This will make your life difficult.
You are the one who's going to install the provider(Oracle and Access). So when you are distributing the application use INI file or registry to save the provider. and use a encrypt/decrypt method if you have any concerns about security. according to the provider, select the sql statement written to support Oracle OR Access.