General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only