DSN Less Connection

Results 1 to 4 of 4

Thread: DSN Less Connection

  1. #1
    Join Date
    Dec 1969

    Default DSN Less Connection

    My hosting service does not set up DSN&#039;s.<BR>Could someone give me the code of a DSN less connection and how to give the path

  2. #2
    Sunny Guest

    Default RE: DSN Less Connection

    &#060;%<BR>set conn=Server.CreateObject("ADODB.Connection")<BR>co nn.Provider="Microsoft.Jet.OLEDB.4.0"<BR>conn.Open "c:/webdata/northwind.mdb"<BR>%&#062;

  3. #3
    CousinIT Guest

    Default RE: DSN Less Connection

    Access mdb connection string<BR>Provider=Microsoft.Jet.OLEDB.4.0;User ID=admin;Data Source=c:mydirmydatabase.mdb;Persist Security Info=False<BR><BR>sqlserver connection string<BR>Provider=SQLOLEDB.1;Password=;Persist Security Info=True;User ID=sa;Initial Catalog=SQLdatabasename;Data Source=servername

  4. #4
    Vijaya Seshan Guest

    Default RE: DSN Less Connection

    You can also use like this:<BR>cnstr = "Provider=SQLOLEDB.1;Persist Security Info=False;Persist Security Info=False;User ID=sa;Pwd=;Initial Catalog=databasename;Data Source=machinename"<BR>set cn = server.CreateObject("ADODB.connection")<BR>set rs = server.CreateObject("ADODB.recordset")<BR>cn.Open cnstr<BR>ssql = "select * from tablename"<BR>rs.Open ssql,cn<BR><BR>just change the user id and password which is used to access your database and give the databasename in the Catalog and the server name in the Source(instead of machinename)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts