Setting up ODBC Connection in web.config
- From: Rocky20 <msmith1265@xxxxxxxxxxx>
- Date: Thu, 20 Mar 2008 08:48:56 -0700 (PDT)
I need to know how to setup and use an ODBC connection to SQL Server
through the web.config file.
I have done a connection using OLEDB but not with ODBC. Here's what I
have with the OLEDB.
Web.Config
<add key="connectionString" value="data source=Testdb1; initial
Catalog=Test; user=tester; password=test"/>
In the code
Dim conn As SqlConnection = New
SqlConnection(ConfigurationManager.AppSettings("connectionString"))
Conn.open
I have an ODBC datasource setup already called TestDS. So how would
I setup my web.config file to use TestDS and what would my code look
like to open it.
Thanks
.
- Follow-Ups:
- Re: Setting up ODBC Connection in web.config
- From: Mark Rae [MVP]
- Re: Setting up ODBC Connection in web.config
- From: Ray Costanzo
- Re: Setting up ODBC Connection in web.config
- Prev by Date: Re: DotNetNuke doesn't work
- Next by Date: Re: adding days to start date
- Previous by thread: Re: DotNetNuke doesn't work
- Next by thread: Re: Setting up ODBC Connection in web.config
- Index(es):
Relevant Pages
|