Ask a Question related to ASP Database, Design and Development.
-
Mike Hill #1
Best connection string to connect to SQL dbase...
I need to connect to a dbase. I will be using ASP.NET, Windows 2003 Server,
and SQL 2000. What would the best connection method be:
OLE DB :
<%
Set cnn = Server.CreateObject("ADODB.Connection")
cnn.open "PROVIDER=SQLOLEDB;DATA
SOURCE=sqlservername;UID=username;PWD=password;DAT ABASE=mydatabase "
%>
With DSN :
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "DSN=MyDSN;UID=user;PWD=password;DATABASE=mydataba se"
%>
Without DSN :
<%
Set Conn = Server.CreateObject("ADODB.Connection")
DSNtest="DRIVER={SQL
Server};SERVER=ServerName;UID=USER;PWD=password;DA TABASE=mydatabase"
Conn.open DSNtest
%>
I go these off of MS web site. (Or would there be a beter way?)
Thanks,
M
Mike Hill Guest
-
Connect to Oracle DB using Connection String
:confused; Please help me out here. I want to connect to Oracle 9i / 10g database using connection string defined in the application.cfm to create... -
What is the most efficient way to connect to a MySQL dbase?
I am setting up a data driven site and I will be using MySQL. What is the best connection method to use. (ADO, etc..) It will be hosed on a W2K... -
Access dbase connection string errors
I keep getting "Unable to open registry key 'Temporary (volatile) Jet DSN " errors pointing to my connection string when the same connection string... -
Connection String to connect to SQL Server Database
http://www.able-consulting.com/ADO_Conn.htm Brian Staff -
#14562 [Asn->Csd]: dBase: Unable to obtain dBase file structure
ID: 14562 Updated by: zak@php.net Reported By: tom dot polak at post dot sk -Status: Assigned +Status: ... -
CJM #2
Re: Best connection string to connect to SQL dbase...
[url]http://www.aspfaq.com/show.asp?id=2126[/url]
Chris
CJM Guest
-
Aaron [SQL Server MVP] #3
Re: Best connection string to connect to SQL dbase...
OLEDB (the first one). However, please post further asp.net questions to an
asp.net newsgroup.
--
[url]http://www.aspfaq.com/[/url]
(Reverse address to reply.)
"Mike Hill" <mhill7272(at)hotmail.com> wrote in message
news:uLcIbfjTEHA.808@tk2msftngp13.phx.gbl...Server,> I need to connect to a dbase. I will be using ASP.NET, Windows 2003> and SQL 2000. What would the best connection method be:
>
> OLE DB :
> <%
> Set cnn = Server.CreateObject("ADODB.Connection")
> cnn.open "PROVIDER=SQLOLEDB;DATA
> SOURCE=sqlservername;UID=username;PWD=password;DAT ABASE=mydatabase "
> %>
>
> With DSN :
> <%
> Set Conn = Server.CreateObject("ADODB.Connection")
> Conn.open "DSN=MyDSN;UID=user;PWD=password;DATABASE=mydataba se"
> %>
>
> Without DSN :
> <%
> Set Conn = Server.CreateObject("ADODB.Connection")
> DSNtest="DRIVER={SQL
> Server};SERVER=ServerName;UID=USER;PWD=password;DA TABASE=mydatabase"
> Conn.open DSNtest
> %>
>
> I go these off of MS web site. (Or would there be a beter way?)
>
> Thanks,
>
> M
>
>
>
Aaron [SQL Server MVP] Guest



Reply With Quote

