Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ODBC issue - works in command window, but not in a program
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
ODBC issue - works in command window, but not in a program
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows 2003 Server
Divers
Thread ID:
01238722
Message ID:
01238722
Vues:
72
I'm linking to an ODBC database - (Syspro)

The connect command is
h=sqlconnect('Syspro','dba','')

This works wonderfully in the command window. It works in a program (prg file)

However if the same line is in code it fails with the following error. (returned by aerror)

DIAG [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)

How can it work in the command box,a program, but not in a form. (It is supposed to work in a form...

BTW I've tried it in VFP7 AND VFP9 as well and it has the same problem... works in the command box or a program, but not in a form.

Any ideas?

TIA,
Mike
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform