access update induced VB6 error (1 Viewer)

gsc_81

Registered User.
Local time
Yesterday, 23:06
Joined
Sep 24, 2004
Messages
30
We have VB6 forms which use SQL to build queries on the fly. We updated the databases from 97 to 2000. Once done we have one control that gives the error 3343 unrecognized database even if we use SQL that works on the same type of control on a different table (same db). Does the syntax for inputting SQL queries with VB vary from access 97 to 2000?
I hope that I'm explaining this adequetely as it is completely confusing.

Thanks.
 

LaBelette

It means "The Weasel"
Local time
Yesterday, 23:06
Joined
Mar 12, 2004
Messages
68
More details?

Can you give us an example fo a query that cause a bug, or the code used to build the query, including the connection string? That would help.

Error 3343 unrecognized database : sounds like a conenction string problem to me. I think that when upgrading Access, it upgraded Microsoft Jet, and the string might be different for the new version of Jet.
 

gsc_81

Registered User.
Local time
Yesterday, 23:06
Joined
Sep 24, 2004
Messages
30
You would think ...

You'd think so but it connects fine. It's as if the form itself has some hidden link to the old access 97 DAO even though the VB properties link to the access 2K version. I used the Debug.Print option to export the SQL. When the SQL is directly run on the db it works like a charm. It's like it doesn't like the syntax although it's almost identical to the code in other forms that function fine.

Boss won't cut loose with controlling the code -no matter how basic or out of context it is.

Thanks for trying when no one else would.
 

LaBelette

It means "The Weasel"
Local time
Yesterday, 23:06
Joined
Mar 12, 2004
Messages
68
If there are dates in the faulty queries, try checking the syntax. I think that if you don't format the dates in VB, it can be misinterpreted by Access.

Try
Code:
format([I]your date[/I] , "mm-dd-yyyy")

It's the format Microsoft Jet prefer. If you still have problems, wrap it with two # . Ex.: #01-25-2004#

Hope it helps!!!
 

Users who are viewing this thread

Top Bottom