I want to Write ADO Code for ActiveX DLL to use in ASP Page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emmfajis
    New Member
    • Sep 2006
    • 6

    I want to Write ADO Code for ActiveX DLL to use in ASP Page

    I want to Write ADO Code for ActiveX DLL to use in ASP Page, when i try to called it it will giving me the following error:
    Error Type:
    Microsoft VBScript runtime (0x800A01A8)
    Object required:

    I need anyone to assist me in doing this.
    Thanks
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi there,

    Help is possible only if you could provide a little more information, such as, your current coding segment, it's alot more easier in that way. Will try to debug your code.. take care my fren.. :)

    Originally posted by emmfajis
    I want to Write ADO Code for ActiveX DLL to use in ASP Page, when i try to called it it will giving me the following error:
    Error Type:
    Microsoft VBScript runtime (0x800A01A8)
    Object required:

    I need anyone to assist me in doing this.
    Thanks

    Comment

    • emmfajis
      New Member
      • Sep 2006
      • 6

      #3
      Thank you, the following are the code i write with my VB6.0 project
      Option Explicit
      ' Create a reference to Connection object
      Public con As ADODB.Connectio n
      ' Create a reference to a Recordset object
      Public rst As ADODB.Recordset

      Public Function MyConnection()

      Dim sConString As String
      Dim sSQLString As String
      ' Create a new instance of the Connection object
      Set con = New ADODB.Connectio n

      ' Create a new instance of the Recordset object
      Set rst = New ADODB.Recordset

      'Creating connection to Database
      sConString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=C:\Progr am Files\Microsoft Visual Studio\VB98\Bib lio.mdb"

      'Creating statement to Select information from Authors table
      sSQLString = "SELECT TOP 10 Author FROM Authors WHERE Au_ID=10"
      Set rst = con.Execute(sSQ LString)

      End Function


      So help me send the Debugging version and the correct code if possible u can send the code for the ASP Page too

      Thank You

      Comment

      • sashi
        Recognized Expert Top Contributor
        • Jun 2006
        • 1749

        #4
        Hi there,

        Your code seems to be ok, i didn't find any error's in your code, probably check the naming standard of your controls, i.e textbox, combobox.. take care my fren.. :)


        Originally posted by emmfajis
        Thank you, the following are the code i write with my VB6.0 project
        Option Explicit
        ' Create a reference to Connection object
        Public con As ADODB.Connectio n
        ' Create a reference to a Recordset object
        Public rst As ADODB.Recordset

        Public Function MyConnection()

        Dim sConString As String
        Dim sSQLString As String
        ' Create a new instance of the Connection object
        Set con = New ADODB.Connectio n

        ' Create a new instance of the Recordset object
        Set rst = New ADODB.Recordset

        'Creating connection to Database
        sConString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=C:\Progr am Files\Microsoft Visual Studio\VB98\Bib lio.mdb"

        'Creating statement to Select information from Authors table
        sSQLString = "SELECT TOP 10 Author FROM Authors WHERE Au_ID=10"
        Set rst = con.Execute(sSQ LString)

        End Function


        So help me send the Debugging version and the correct code if possible u can send the code for the ASP Page too

        Thank You

        Comment

        • emmfajis
          New Member
          • Sep 2006
          • 6

          #5
          Thank you my Friend, I will try to check all what you ask me to. But if i can't solve it i will let you know.

          Thanks friend.


          Originally posted by sashi
          Hi there,

          Your code seems to be ok, i didn't find any error's in your code, probably check the naming standard of your controls, i.e textbox, combobox.. take care my fren.. :)

          Comment

          • Spodgy
            New Member
            • Oct 2006
            • 2

            #6
            I don't see a connection open statement in the code?

            Comment

            • willakawill
              Top Contributor
              • Oct 2006
              • 1646

              #7
              Originally posted by emmfajis
              'Creating connection to Database
              sConString = "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=C:\Progr am Files\Microsoft Visual Studio\VB98\Bib lio.mdb"
              That's right. You have a connection string ready to be used by the connection object and you miss the step:

              Code:
              con.Open sConString

              Comment

              Working...