DSNLess Connection | UserPreferences |
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
- Or use an XML Web Service via SOAP Toolkit or ASP.NET
- Or upgrade to SQL Server and use an IP connection string
- Or use an ADO URL with a remote ASP web page
- Or use a MS Remote or RDS connection string
If you don't know the path to the MDB (using ASP)
<% ' ASP server-side code
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
If you don't know the path to the MDB (using VB)
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
For more information, see: Microsoft Access Driver Programming Considerations
To view Microsoft KB articles related to Microsoft Access Driver, click here
oRs.Open "Select * From user.dbf", oConn, , ,adCmdText?
Note: MDAC 2.1 (or greater) requires the Borland Database Engine (BDE) to update dBase DBF files. (Q238431).
For more information, see: dBASE Driver Programming Considerations
To view Microsoft KB articles related to Microsoft dBASE Driver, click here
To view Microsoft KB articles related to Microsoft Excel Driver, click here
oConn.Open "Dsn=;" & _
oConn.Open "Driver={Informix-CLI 2.5 (32 Bit)};" & _
oConn.Open "Driver={Easysoft IB6 ODBC};" & _
oConn.Open "Driver={Easysoft IB6 ODBC};" & _
oConn.Open "Driver={INTERSOLV InterBase? ODBC Driver (*.gdb)};" & _
oConn.Open "Driver={INTERSOLV InterBase? ODBC Driver (*.gdb)};" & _
oConn.Open "Driver={mySQL};" & _
oConn.Open "Driver={mySQL};" & _
oConn.Open "Driver={Microsoft ODBC for Oracle};" & _
oConn.Open "Driver={Microsoft ODBC Driver for Oracle};" & _
To view Microsoft KB articles related to Microsoft ODBC for Oracle, click here
For more information, see: Oracle8 ODBC Driver Help, Oracle ODBC FAQs, asporacle? listserv FAQs, and ASPDB Oracle
Note: There is an extra space after "db" in the Paradox Driver name
For more information, see: Paradox Driver Programming Considerations
To view Microsoft KB articles related to Microsoft Paradox Driver, click here
oConn.Open "Driver={SQL Server};" & _
oConn.Open "Driver={SQL Server};" & _
oConn.Properties("Prompt") = adPromptAlways?
oConn.Open "Driver={SQL Server};" & _
oConn.Open "Driver={SQL Server};" & _
To view Microsoft KB articles related to ODBC Driver for SQL Server, click here
oConn.Open "Driver={SYBASE ASE ODBC Driver};" & _
oConn.Open "Driver={SYBASE SYSTEM 11};" & _
oConn.Open "Driver={INTERSOLV 3.10 32-BIT Sybase};" & _
To view Microsoft KB articles related to ODBC Driver for Sybase, click here
For more information, see: Sybase SQL Anywhere User Guide
oRs.Open "Select * From customer.csv", _
For more information, see: Text File Driver Programming Considerations
To view Microsoft KB articles related to Microsoft Text Driver, click here
oConn.Open "Driver={Microsoft Visual FoxPro? Driver};" & _
oConn.Open "Driver={Microsoft Visual FoxPro? Driver};" & _
"Driver={INFORMIX 3.30 32 BIT};" & _
' Or
"Host=myHostname;" & _
"Server=myServerName?;" & _
"Service=myServiceName?;" & _
"Protocol=olsoctcp;" & _
"Database=myDbName?;" & _
"UID=myUsername;" & _
"PWD=myPassword" & _
oConn.Open "Dsn=myDsn;" & _
"Host=myHostname;" & _
If using INFORMIX-CLI 2.5 ODBC Driver
"Server=myServerName?;" & _
"Service=myServiceName?;" & _
"Protocol=onsoctcp;" & _
"Database=myDbName?;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
ODBC Driver for Interbase (from Easysoft)
For the local machine
"Server=localhost;" & _
For a remote machine
"Database=localhost:C:\Home\Data\Mydb.gdb;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
"Server=myMachineName?;" & _
For more information, see: Connecting to InterBase? and Easysoft
"Database=myC:\Home\Data\Mydb.gdb;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
ODBC Driver for Interbase (from InterSolv?)
For the local machine
"Server=localhost;" & _
For a remote machine
"Database=localhost:C:\Home\Data\Mydb.gdb;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
"Server=myMachineName?;" & _
For more information, see: Google Search (if you know a direct URL email me)
"Database=myC:\Home\Data\Mydb.gdb;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
ODBC Driver for Lotus Notes
oConn.Open "Driver={Lotus NotesSQL 3.01 (32-bit) ODBC DRIVER (*.nsf)};" & _
"Server=myServerName?;" & _
For more information, see: Connection keywords
"Database=mydir\myDbName?.nsf;" & _
"Uid=myUsername;" & _
"Pwd=myPassword" & _
ODBC Driver for MySQL (via MyODBC)
To connect to a local database
"Server=MyServerName?;" & _
To connect to a remote database
"Option=16834;" & _
"Database=mydb"
"Server=db1.database.com;" & _
For more information, see: Programs Known to Work with MyODBC
"Port=3306;" & _
"Option=131072;" & _
"Stmt=;" & _
"Database=mydb;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
ODBC Driver for Oracle (from Microsoft)
For the current Oracle ODBC Driver from Microsoft
"Server=OracleServer?.world;" & _
For the older Oracle ODBC Driver from Microsoft
"Uid=myUsername;" & _
"Pwd=myPassword"
ODBC Driver for Oracle (from Oracle)
oConn.Open "Driver={Oracle ODBC Driver};" & _
"Dbq=myDBName;" & _
Where: The DBQ name must be defined in the tnsnames.ora file
"Uid=myUsername;" & _
"Pwd=myPassword"
ODBC Driver for Paradox
oConn.Open "Driver={Microsoft Paradox Driver (*.db )};" & _
"DriverID=538;" & _
Note: MDAC 2.1 (or greater) requires the Borland Database Engine (BDE) to update Paradox ISAM fDBF files. (Q230126).
"Fil=Paradox 5.X;" & _
"DefaultDir?=c:\dbpath\;" & _
"Dbq=c:\dbpath\;" & _
"CollatingSequence?=ASCII"
ODBC Driver for SQL Server
For Standard Security
oConn.Open "Driver={SQL Server};" & _
To Prompt user for username and password
oConn.Open "Driver={SQL Server};" & _
"Server=(local);" & _
To connect to SQL Server running on a remote computer (via an IP address)
"Database=myDatabaseName?;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
"Server=xxx.xxx.xxx.xxx;" & _
Where:
"Address=xxx.xxx.xxx.xxx,1433;" & _
"Network=DBMSSOCN;" & _
"Database=myDatabaseName?;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
- xxx.xxx.xxx.xxx is an IP address
- 1433 is the default port number for SQL Server.
- "Network=DBMSSOCN" tells ODBC to use TCP/IP rather than Named
Pipes (Q238949)
For more information, see: SQLDriverConnect? (ODBC)
ODBC Driver for Sybase
If using the Sybase System 12 (or 12.5) Enterprise Open Client ODBC Driver
"Srvr=myServerName?;" & _
If using the Sybase System 11 ODBC Driver
"Uid=myUsername;" & _
"Pwd=myPassword"
"Srvr=myServerName?;" & _
If using the Intersolv 3.10 Sybase ODBC Driver
"Uid=myUsername;" & _
"Pwd=myPassword"
"Srvr=myServerName?;" & _
For more information, see: Sybase System 10 ODBC Driver Reference Guide
"Uid=myUsername;" & _
"Pwd=myPassword"
ODBC Driver for Sybase SQL Anywhere
oConn.Open "ODBC; Driver=Sybase SQL Anywhere 5.0;" & _
"DefaultDir?=c:\dbpath\;" & _
Note: Including the DSN tag with a null string is absolutely critical or else you get the dreaded -7778 error.
"Dbf=c:\sqlany50\mydb.db;" & _
"Uid=myUsername;" & _
"Pwd=myPassword;" & _
"Dsn="""""
ODBC Driver for Teradata
oConn.Open "Provider=Teradata;" & _
For more information, see Teradata ODBC Driver
ODBC Driver for Text
oConn.Open _
"Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
Then specify the filename in the SQL statement:
"Dbq=c:\somepath\;" & _
"Extensions=asc,csv,tab,txt"
ODBC Driver for Visual FoxPro?
With a database container
ÇÁ·Î±×·¡¹ÖºÐ·ù
EditText
of this page
(last modified 2003-08-28 11:08:19)
FindPage
by browsing, searching, or an index
Or try one of these actions:
DeletePage,
DeleteUploadedFile,
LikePages,
SpellCheck,
UploadFile