Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Access
Message
De
14/11/2001 22:24:35
 
 
À
13/11/2001 23:01:14
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Re: Access
Divers
Thread ID:
00581281
Message ID:
00581884
Vues:
23
Thank u for ur kind reply.

Yr infomation r really helpful. But I need to specify the system table, userid and passward to access the Ms Access 7 data.

Here is how I define DSN:

#DEFINE ODBC_ADD_DSN 1
#DEFINE ODBC_ADD_SYS_DSN 4

DECLARE LONG SQLConfigDataSource IN ODBCCP32.DLL ;
LONG hwndParent, LONG fRequest, STRING lpszDriver, STRING lpszAttributes

strDriver = 'Microsoft Access Driver (*.mdb)'
strAttributes = 'DESCRIPTION=MEX'+CHR(0)
strAttributes = strAttributes + 'DSN=MEX'+ CHR(0)
strAttributes = strAttributes + 'DBQ=H:\MEXDATA.MDB'+CHR(0)
strAttributes = strAttributes + 'DriverId=281'+CHR(0)
strAttributes = strAttributes + 'SystemDB=H:\SYSMEX.MDW'+CHR(0)
strAttributes = strAttributes + 'UID=ADMIN'+CHR(0)
strAttributes = strAttributes + 'PWD=ADMIN'+CHR(0)
intRet = SQLConfigDataSource(0,ODBC_ADD_DSN, @strDriver, @strAttributes)
IF intRet = 0
MESSAGEBOX('DSN Create Failed')
ENDIF


Could you show me how to do it in ADO?

TIA.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform