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. ODBC Connection via ASP

ODBC Connection via ASP

Scheduled Pinned Locked Moved Web Development
databasehelpsql-serversysadminquestion
4 Posts 2 Posters 1 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.
  • B Offline
    B Offline
    BravoTwoZero
    wrote on last edited by
    #1

    :rolleyes: Hi All, I am trying to retrived data from SQL server in my asp page via ODBC connection. I have done the ODBC connection via administration tool. MY Code is: <% dim oConn, strSQL, rstMovie, Records set rstMovie = Server.CreateObject("ADODB.RECORDSET") Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open "Provider=MSDASQL; Driver={SQL SERVER}; SERVER=localhost; database=Movie2002; UID=test; PWD=test;" strSQL = "Select * From tbl_movie" rstMovie.Open strSQL,oConn,adOpenForwardOnly,adLockReadOnly %> when I am trying to view the page on the browser the error message is 'page cannot be displayed'. The error message relates to ODBC connection I think. Can anybody help?!! Many Thanks. Bravo Two Zero A pen is mighter then a sword.

    P 1 Reply Last reply
    0
    • B BravoTwoZero

      :rolleyes: Hi All, I am trying to retrived data from SQL server in my asp page via ODBC connection. I have done the ODBC connection via administration tool. MY Code is: <% dim oConn, strSQL, rstMovie, Records set rstMovie = Server.CreateObject("ADODB.RECORDSET") Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open "Provider=MSDASQL; Driver={SQL SERVER}; SERVER=localhost; database=Movie2002; UID=test; PWD=test;" strSQL = "Select * From tbl_movie" rstMovie.Open strSQL,oConn,adOpenForwardOnly,adLockReadOnly %> when I am trying to view the page on the browser the error message is 'page cannot be displayed'. The error message relates to ODBC connection I think. Can anybody help?!! Many Thanks. Bravo Two Zero A pen is mighter then a sword.

      P Offline
      P Offline
      Pyt
      wrote on last edited by
      #2

      Try this: "DSN=MyDSN;UID=user;PWD=password;DATABASE=mydatabase" Pyt.

      P 1 Reply Last reply
      0
      • P Pyt

        Try this: "DSN=MyDSN;UID=user;PWD=password;DATABASE=mydatabase" Pyt.

        P Offline
        P Offline
        Pyt
        wrote on last edited by
        #3

        Sorry about the smiley, "DSN=MyDSN;UID=user;PWD=password;DATABASE=mydatabase" Pyt

        B 1 Reply Last reply
        0
        • P Pyt

          Sorry about the smiley, "DSN=MyDSN;UID=user;PWD=password;DATABASE=mydatabase" Pyt

          B Offline
          B Offline
          BravoTwoZero
          wrote on last edited by
          #4

          :-D Many Thanks Bravo Two Zero A pen is mighter then a sword.

          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