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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange ODBC error

Status
Not open for further replies.

safraser

Programmer
Apr 12, 2001
76
0
0
NZ
Hi guys
I'm a little stumped by this problem, I was hoping some here could give me some pointers etc

I have a odbc drver that seems to work fine in some situations, others it just stops working. The driver is provided by an Accounting software developer for their own database implementation.

If I create a new windows or console application, open a connection and try to run a simple sql select query I get an error suggesting that my sql is malformed, which it is not.
Now if I create a new ASP project, use the exact same connection string, against the exact same data set, and the exact same query, it runs perfectly.

I've gone back to the provider to ask if there is anything they know of, but I believe that this is something I've not got quite right and can't for the life of me figure out what.

Thanks
 
Here are a few questions:

What database are you connecting to?
Is the driver compatible with the system you are using?
Is this a 32-bit or 64-bit driver?
If you are running on a 64-bit system and it's a 32 bit driver, are you sure you are using the 32 ODBC utility (I believe it's located in the SysWow64 folder)?

If at first you don't succeed, then sky diving wasn't meant for you!
 
Thanks for the interest Bluejay
It's a propriety DB built for a specific accounting package. The driver is provided by the DB developers for this DB implementation so I'm assuming that it is compatible. It is a 32bit driver, and I'm being very careful to ensure I compile everything in 32bit etc.

Like I said in the original post, It works find form an ASP.net project, from a windows/console app though, I get the problems.
I've even tried writing the db access as a separate class libary dll, then referenced it from both project types, again ASP.net projects works fines, windows/console apps not so good
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top