Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access
Message
From
14/11/2001 22:24:35
 
 
To
13/11/2001 23:01:14
Gavin Reid
L & M Marketing Pty Ltd
Frenchs Forest, Australia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Re: Access
Miscellaneous
Thread ID:
00581281
Message ID:
00581884
Views:
22
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform