Link to home
Start Free TrialLog in
Avatar of thatelvis
thatelvis

asked on

connection string non dsn

Hello,
I have usually used a dsn connection but for reasons i want to use a non dsn. this is what i have

<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_connleeleek_STRING
MM_connleeleek_STRING = "dsn=mydsnname;uid=myuserid;pwd=andmypassword;"
%>


I have been having at look at the connection strings here note i am useing sql 2005

http://www.connectionstrings.com/?carrier=sqlserver2005

this seems the most appropreate.

Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;

but I was wondering what is the complete string as in what else will i need between the <% %> to get the above working.

cheers

kenny
Avatar of thatelvis
thatelvis

ASKER

Hi again I tried this too but it doesnt work

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_connleekleep_STRING
MM_connleekleep_STRING = "Driver={SQL Native Client};Server=myServerAddress;Database=SQLB118.webcontrolcenter.com;Uid=myuname;Pwd=mypw;"
%>
ASKER CERTIFIED SOLUTION
Avatar of kevp75
kevp75
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks all, this works brilliant

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="true"
' Catalog=""
' Schema=""
Dim MM_connleekleep_STRING
MM_connleekleep_STRING = "Provider=SQLOLEDB; Data Source=SQLB18.webcontrolcenter.com; Initial Catalog=dbadmin; User ID=hairybellybutton; Password=gingerginger;"
%>
cheers