Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...thank you for the wonderful resource that you have enabled here. It is clear, concise, well maintained and most importantly, helpful..."

Geography

Where in the world do Tek-Tips members come from?
ianwin (Programmer)
15 Jun 12 8:07
Hi,

I am trying to get a VB5 app which uses a workspace to run the following ODBC connection

CODE

Global ODBC_WS as Workspace
Global ODBC_DB as Connection

set ODBC_WS = CreateWorkspace ("","", dbUseODBC)
set ODBC_DB = ODBC_WS.OpenDatabase("", dbDriverComplete, False, "ODBC;DSN=DSN;UID=user;PWD=PASSWORD")

This works without issue when run in the IDE however after compiling and running the exe the Set ODBC_DB line fails with error message "ODBC call Failed"

There are no other dependant files and I have tried recreating the DSN and deleting the old exe before recompiling none of which work.

Any advice would be greatly appreciated.

-Ian
tedsmith (Programmer)
21 Jun 12 10:21
I have read there are some problems with compiling a VB6 app on Win7, The exe may not run everything on a previous OS like XP.
I keep an old drive with XP on it and boot up on use this when developing. I haven't had any problem with compiling on XP and running in Win 7 except you can't use any old 16 bit Activex's
crystalkiwibruce (Programmer)
26 Jun 12 0:15
First thing to check is if your app is 32 or 64 bit, and is the Windows 7 version 32 bit or 64 bit.

A 32 bit app needs the 32 bit odbc connection on a 64 bit version of windows. Don't use the control panel ODBC connector. There is a 32 bit ODBC setting under the C:\Windows\SysWOW64\odbcad32.exe and you have to use that to configure any 32 bit connections.

Bruce Ferguson
www.crystalkiwi.com/nlog.htm

ianwin (Programmer)
26 Jun 12 3:27
Thanks for the feedback, The app and windows installation are both 32 bit. I have since identified that this issue was realted to ODBC linked tables used in a local MS Access database which is also accessed by this application. By using a version of the database stored in the application directory with the deployment I have been able to resolve this issue.

Thanks all for the assistance.

-Ian

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close