-
Accessing data sources without creating it in ODBC Administrator
In vb, how can I get access to data sources that are in sql server without
adding it to the ODBC Data Source Administrator?
-
Re: Accessing data sources without creating it in ODBC Administrator
If you mean connecting to a data source without using a DSN, you can do it
with ADO. Here's an example:
Dim oConn as New ADODB.Connection
' For SQL Server:
sDataSource = "Driver={SQL Server};server=myserver;database=mydatabase;"
' For an MDB:
sDataSource = "Driver={Microsoft Access Driver
(*.mdb)};dbq=c:\myaccessdatabase.mdb"
oConn.Open sDataSource
-- Joel
Bryan wrote:
> In vb, how can I get access to data sources that are in sql server without
> adding it to the ODBC Data Source Administrator?
-
Re: Accessing data sources without creating it in ODBC Administrator
If you mean connecting to a data source without using a DSN, you can do it
with ADO. Here's an example:
Dim oConn as New ADODB.Connection
' For SQL Server:
sDataSource = "Driver={SQL Server};server=myserver;database=mydatabase;"
' For an MDB:
sDataSource = "Driver={Microsoft Access Driver
(*.mdb)};dbq=c:\myaccessdatabase.mdb"
oConn.Open sDataSource
-- Joel
Bryan wrote:
> In vb, how can I get access to data sources that are in sql server without
> adding it to the ODBC Data Source Administrator?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|