Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Classic ASP ConnectionString?

Classic ASP ConnectionString?

Scheduled Pinned Locked Moved ASP.NET
questioncsharpasp-netdatabasesysadmin
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hifiger2004
    wrote on last edited by
    #1

    Hi Guys, I know that this is an ASP.Net forum, but just in case some of you still remember about the classic ASP, I have one question. How can I assigned connection in Classic ASP using the MSSQLServer 2005? I tried this code below, but I got an error. Below is the connection string I have tried, but has an error       Application("ConnStr") = "server=PC\SQLEXPRESS;database=TestDB;Trusted_Connection=True;" What's wrong with it?

    hifiger2004

    A A A 3 Replies Last reply
    0
    • H hifiger2004

      Hi Guys, I know that this is an ASP.Net forum, but just in case some of you still remember about the classic ASP, I have one question. How can I assigned connection in Classic ASP using the MSSQLServer 2005? I tried this code below, but I got an error. Below is the connection string I have tried, but has an error       Application("ConnStr") = "server=PC\SQLEXPRESS;database=TestDB;Trusted_Connection=True;" What's wrong with it?

      hifiger2004

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      hifiger2004 wrote:

      I know that this is an ASP.Net forum, but just in case some of you still remember about the classic ASP,

      I guess Web Development Forum is the best location where you can ask this. For you ref. You can check following links. that may help you : [^] and http://forums.digitalpoint.com/showthread.php?t=154140[^] and http://www.devarticles.com/c/a/ASP/Two-Ways-To-Connect-To-SQL-Server-2000-Via-ASP/3/[^]

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      1 Reply Last reply
      0
      • H hifiger2004

        Hi Guys, I know that this is an ASP.Net forum, but just in case some of you still remember about the classic ASP, I have one question. How can I assigned connection in Classic ASP using the MSSQLServer 2005? I tried this code below, but I got an error. Below is the connection string I have tried, but has an error       Application("ConnStr") = "server=PC\SQLEXPRESS;database=TestDB;Trusted_Connection=True;" What's wrong with it?

        hifiger2004

        A Offline
        A Offline
        Appusamy subbian
        wrote on last edited by
        #3

        I guess ASP uses class ADO for data base connection .You need t provide provider information Provider=SQLNCLI10;Server=myServerAddress;Database=myDataBase;Trusted_Connection=yes;

        1 Reply Last reply
        0
        • H hifiger2004

          Hi Guys, I know that this is an ASP.Net forum, but just in case some of you still remember about the classic ASP, I have one question. How can I assigned connection in Classic ASP using the MSSQLServer 2005? I tried this code below, but I got an error. Below is the connection string I have tried, but has an error       Application("ConnStr") = "server=PC\SQLEXPRESS;database=TestDB;Trusted_Connection=True;" What's wrong with it?

          hifiger2004

          A Offline
          A Offline
          Ashfield
          wrote on last edited by
          #4

          hifiger2004 wrote:

          What's wrong with it?

          Everything :) Google for ado, check connectionstrings.com for connection details

          Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

          H 1 Reply Last reply
          0
          • A Ashfield

            hifiger2004 wrote:

            What's wrong with it?

            Everything :) Google for ado, check connectionstrings.com for connection details

            Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

            H Offline
            H Offline
            hifiger2004
            wrote on last edited by
            #5

            still doesn't work :( In ASP.Net there's no problem when using this type of connection string inside the web.config <add name="ConnStr" connectionString="Data Source=PCName\SQLEXPRESS; Initial Catalog=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient" /> I tried the codes below and placed it inside the global.asa but still doesn't work. Error: An unhandled exception ('[Microsoft][ODBC Driver Manager] Dta source name not found and no default driver specified') occurred in dllhost.exe [1368]. ConnStr = "Driver={SQL Server};Data Source=PCName\SQLEXPRESS;Initial Catalog=MyDatabase;Trusted_Connection=Yes;" Or ConnStr = "Provider=SQLOLEDB; Data Source =PCName\SQLEXPRESS; Initial Catalog = MyDatabase;Integrated Security=SSPI;" It's really time consuming, I followed everything you told me from connectionstrings.com but still doesn't work at all.

            hifiger2004

            A 1 Reply Last reply
            0
            • H hifiger2004

              still doesn't work :( In ASP.Net there's no problem when using this type of connection string inside the web.config <add name="ConnStr" connectionString="Data Source=PCName\SQLEXPRESS; Initial Catalog=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient" /> I tried the codes below and placed it inside the global.asa but still doesn't work. Error: An unhandled exception ('[Microsoft][ODBC Driver Manager] Dta source name not found and no default driver specified') occurred in dllhost.exe [1368]. ConnStr = "Driver={SQL Server};Data Source=PCName\SQLEXPRESS;Initial Catalog=MyDatabase;Trusted_Connection=Yes;" Or ConnStr = "Provider=SQLOLEDB; Data Source =PCName\SQLEXPRESS; Initial Catalog = MyDatabase;Integrated Security=SSPI;" It's really time consuming, I followed everything you told me from connectionstrings.com but still doesn't work at all.

              hifiger2004

              A Offline
              A Offline
              Ashfield
              wrote on last edited by
              #6

              hifiger2004 wrote:

              In ASP.Net there's no problem when using this type of connection string inside the web.config

              But you are using CLASSIC ASP you said. It knows nothing about web.config, global.asa etc, these are .NET only. You need to use ADO NOT ADO.NET, create connection objects and so on. Take a look at this: http://support.microsoft.com/kb/299980[^]

              Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups