Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: ADO Connection To SQL Database


Message #1 by rg1@h... on Thu, 22 Mar 2001 16:12:54
Hi.



I have IIS running on server PP1. I have a SQL database on another server 

PP2. My SQL database I want to access is "RitaTest".



Could you please give me example code to select all the rows from 

table "Networks".



I saw the following example but do not know what "CONNECTION_STRING" 

should look like.



dim sql, oConn, oRs

sql ="SELECT name1, name2 from Networks"



set oConn = server.createobject(CONNECTION_STRING)

set oRs = oConn.execute(sql)



TIA.



Rita

Message #2 by "David Neil" <neil.david.dj@b...> on Thu, 22 Mar 2001 21:59:32
This connect string uses integrated security i.e. the users logon



"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security 

Info=False;Data Source=PP2;Initial Catalog=RitaTest"



This connect string will promp the user for a logon



"Provider=SQLOLEDB.1;Persist Security Info=False;Data Source=PP2;Initial 

Catalog=RitaTest"



This connect string provides the logon



"Provider=SQLOLEDB.1;Persist Security Info=True;User 

ID=Qwerty;Password=qaz;Data Source=PP2;Initial Catalog=RitaTest"



Dave


  Return to Index