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. General Programming
  3. Visual Basic
  4. Problem accessing component from VB

Problem accessing component from VB

Scheduled Pinned Locked Moved Visual Basic
help
2 Posts 2 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.
  • S Offline
    S Offline
    SripriyaBabu
    wrote on last edited by
    #1

    Hai, I've a component registed in my system. When i call the component from the ASP page it works fine. When I create an instance of the same component in VB Application, I get the error, object variable or with block variable not set. The error comes in the 3rd line of my code which i have specified below: Dim Con_Getcon As New JBHRCom.GetConnection Dim Con_ObjDB As New ADODB.Connection Set Con_ObjDB = Con_Getcon.Connection Could anyone help me out as soon as possible. Thank you, Regards, K. Sripriya

    A 1 Reply Last reply
    0
    • S SripriyaBabu

      Hai, I've a component registed in my system. When i call the component from the ASP page it works fine. When I create an instance of the same component in VB Application, I get the error, object variable or with block variable not set. The error comes in the 3rd line of my code which i have specified below: Dim Con_Getcon As New JBHRCom.GetConnection Dim Con_ObjDB As New ADODB.Connection Set Con_ObjDB = Con_Getcon.Connection Could anyone help me out as soon as possible. Thank you, Regards, K. Sripriya

      A Offline
      A Offline
      Anonymous
      wrote on last edited by
      #2

      It's pretty hard to give you a correct answer without knowing what kind of object JBHRCom is, but assuming that you stick to "talking" naming convention, GetConnection method returns an object of ADODB.Connection type. I would try something like this instead: Dim Con_Getcon As New JBHRCom Dim Con_ObjDB As New ADODB.Connection Set Con_ObjDB = Con_Getcon.Connection

      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