COM problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Martinez

    #1

    COM problem

    Hello
    I try declare

    Dim db as New BtDatabase()
    and execute metod
    db.open(par1,pa r2,par3)

    but i get error :

    System.NullRefe renceException was unhandled
    Message="Object reference not set to an instance of an object."
    Source="Microso ft.VisualBasic"
    StackTrace:
    at
    Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
    o, Type objType, String name, Object[] args, String[] paramnames,
    Boolean[] CopyBack, Boolean IgnoreReturn)
    at
    Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
    Instance, Type Type, String MemberName, Object[] Arguments, String[]
    ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
    IgnoreReturn)
    at ForteWB.Wczytyw anieWyciagu.Wcz ytywanieWyciagu _Load(Object
    sender, EventArgs e) in C:\Documents and Settings\Marcin \Moje dokumenty
    \Visual Studio 2005\Projects\F orteWB\ForteWB
    \WczytywanieWyc iagu.vb:line 210
    at System.EventHan dler.Invoke(Obj ect sender, EventArgs e)
    at System.Windows. Forms.Form.OnLo ad(EventArgs e)
    at System.Windows. Forms.Form.OnCr eateControl()
    at System.Windows. Forms.Control.C reateControl(Bo olean
    fIgnoreVisible)
    at System.Windows. Forms.Control.C reateControl()
    at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
    at System.Windows. Forms.Control.W ndProc(Message& m)
    at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
    at System.Windows. Forms.Container Control.WndProc (Message& m)
    at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
    at System.Windows. Forms.Form.WndP roc(Message& m)
    at
    System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
    at
    System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
    at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr
    hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at
    System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef hWnd,
    Int32 msg, Int32 wParam, Int32 lParam)
    at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
    at System.Windows. Forms.Control.s et_Visible(Bool ean value)
    at
    System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
    reason, ApplicationCont ext context)
    at
    System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32
    reason, ApplicationCont ext context)
    at System.Windows. Forms.Applicati on.Run(Applicat ionContext
    context)
    at
    Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.OnRun ()
    at
    Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.DoApp licationModel()
    at
    Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.Run(S tring[]
    commandLine)
    at ForteWB.My.MyAp plication.Main( String[] Args) in 17d14f5c-
    a337-4978-8281-53493378c1071.v b:line 81
    at System.AppDomai n.nExecuteAssem bly(Assembly assembly,
    String[] args)
    at System.Runtime. Hosting.Manifes tRunner.Run(Boo lean
    checkAptModel)
    at System.Runtime. Hosting.Manifes tRunner.Execute AsAssembly()
    at
    System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex t
    activationConte xt, String[] activationCusto mData)
    at
    System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex t
    activationConte xt)
    at
    Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem blyDebugInZone( )
    at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object
    state)
    at System.Threadin g.ExecutionCont ext.Run(Executi onContext
    executionContex t, ContextCallback callback, Object state)
    at System.Threadin g.ThreadHelper. ThreadStart()


    Why i can't execute metod open on object db??

    Marcin

  • Cor Ligthert [MVP]

    #2
    Re: COM problem

    Hi Marcin,

    Probably in par1, par2, par3 has an object to be instanced what is not done.

    However for not AdoNet databases the newsgroup

    micorosoft.publ ic.ado.data is probably much better,

    Cor


    "Martinez" <martinez@szcze cinek.net.plsch reef in bericht
    news:1177877720 .095417.286730@ y80g2000hsf.goo glegroups.com.. .
    Hello
    I try declare
    >
    Dim db as New BtDatabase()
    and execute metod
    db.open(par1,pa r2,par3)
    >
    but i get error :
    >
    System.NullRefe renceException was unhandled
    Message="Object reference not set to an instance of an object."
    Source="Microso ft.VisualBasic"
    StackTrace:
    at
    Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
    o, Type objType, String name, Object[] args, String[] paramnames,
    Boolean[] CopyBack, Boolean IgnoreReturn)
    at
    Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
    Instance, Type Type, String MemberName, Object[] Arguments, String[]
    ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
    IgnoreReturn)
    at ForteWB.Wczytyw anieWyciagu.Wcz ytywanieWyciagu _Load(Object
    sender, EventArgs e) in C:\Documents and Settings\Marcin \Moje dokumenty
    \Visual Studio 2005\Projects\F orteWB\ForteWB
    \WczytywanieWyc iagu.vb:line 210
    at System.EventHan dler.Invoke(Obj ect sender, EventArgs e)
    at System.Windows. Forms.Form.OnLo ad(EventArgs e)
    at System.Windows. Forms.Form.OnCr eateControl()
    at System.Windows. Forms.Control.C reateControl(Bo olean
    fIgnoreVisible)
    at System.Windows. Forms.Control.C reateControl()
    at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
    at System.Windows. Forms.Control.W ndProc(Message& m)
    at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
    at System.Windows. Forms.Container Control.WndProc (Message& m)
    at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
    at System.Windows. Forms.Form.WndP roc(Message& m)
    at
    System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
    at
    System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
    at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr
    hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at
    System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef hWnd,
    Int32 msg, Int32 wParam, Int32 lParam)
    at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
    at System.Windows. Forms.Control.s et_Visible(Bool ean value)
    at
    System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
    reason, ApplicationCont ext context)
    at
    System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32
    reason, ApplicationCont ext context)
    at System.Windows. Forms.Applicati on.Run(Applicat ionContext
    context)
    at
    Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.OnRun ()
    at
    Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.DoApp licationModel()
    at
    Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.Run(S tring[]
    commandLine)
    at ForteWB.My.MyAp plication.Main( String[] Args) in 17d14f5c-
    a337-4978-8281-53493378c1071.v b:line 81
    at System.AppDomai n.nExecuteAssem bly(Assembly assembly,
    String[] args)
    at System.Runtime. Hosting.Manifes tRunner.Run(Boo lean
    checkAptModel)
    at System.Runtime. Hosting.Manifes tRunner.Execute AsAssembly()
    at
    System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex t
    activationConte xt, String[] activationCusto mData)
    at
    System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex t
    activationConte xt)
    at
    Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem blyDebugInZone( )
    at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object
    state)
    at System.Threadin g.ExecutionCont ext.Run(Executi onContext
    executionContex t, ContextCallback callback, Object state)
    at System.Threadin g.ThreadHelper. ThreadStart()
    >
    >
    Why i can't execute metod open on object db??
    >
    Marcin
    >

    Comment

    • Martinez

      #3
      Re: COM problem

      On 30 Kwi, 06:12, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
      wrote:
      Hi Marcin,
      >
      Probably in par1, par2, par3 has an object to be instanced what is not done.
      >
      However for not AdoNet databases the newsgroup
      >
      micorosoft.publ ic.ado.data is probably much better,
      >
      Cor
      >
      "Martinez" <marti...@szcze cinek.net.plsch reef in berichtnews:117 7877720..095417 .286730@y80g200 0hsf.googlegrou ps.com...
      >
      >
      >
      Hello
      I try declare
      >
      Dim db as New BtDatabase()
      and execute metod
      db.open(par1,pa r2,par3)
      >
      but i get error :
      >
      System.NullRefe renceException was unhandled
      Message="Object reference not set to an instance of an object."
      Source="Microso ft.VisualBasic"
      StackTrace:
      at
      Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
      o, Type objType, String name, Object[] args, String[] paramnames,
      Boolean[] CopyBack, Boolean IgnoreReturn)
      at
      Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
      Instance, Type Type, String MemberName, Object[] Arguments, String[]
      ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
      IgnoreReturn)
      at ForteWB.Wczytyw anieWyciagu.Wcz ytywanieWyciagu _Load(Object
      sender, EventArgs e) in C:\Documents and Settings\Marcin \Moje dokumenty
      \Visual Studio 2005\Projects\F orteWB\ForteWB
      \WczytywanieWyc iagu.vb:line 210
      at System.EventHan dler.Invoke(Obj ect sender, EventArgs e)
      at System.Windows. Forms.Form.OnLo ad(EventArgs e)
      at System.Windows. Forms.Form.OnCr eateControl()
      at System.Windows. Forms.Control.C reateControl(Bo olean
      fIgnoreVisible)
      at System.Windows. Forms.Control.C reateControl()
      at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
      at System.Windows. Forms.Control.W ndProc(Message& m)
      at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
      at System.Windows. Forms.Container Control.WndProc (Message& m)
      at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
      at System.Windows. Forms.Form.WndP roc(Message& m)
      at
      System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
      at
      System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
      at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr
      hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
      at
      System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef hWnd,
      Int32 msg, Int32 wParam, Int32 lParam)
      at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
      at System.Windows. Forms.Control.s et_Visible(Bool ean value)
      at
      System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
      reason, ApplicationCont ext context)
      at
      System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32
      reason, ApplicationCont ext context)
      at System.Windows. Forms.Applicati on.Run(Applicat ionContext
      context)
      at
      Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.OnRun ­()
      at
      Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.DoApp ­licationModel( )
      at
      Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.Run(S ­tring[]
      commandLine)
      at ForteWB.My.MyAp plication.Main( String[] Args) in 17d14f5c-
      a337-4978-8281-53493378c1071.v b:line 81
      at System.AppDomai n.nExecuteAssem bly(Assembly assembly,
      String[] args)
      at System.Runtime. Hosting.Manifes tRunner.Run(Boo lean
      checkAptModel)
      at System.Runtime. Hosting.Manifes tRunner.Execute AsAssembly()
      at
      System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex ­t
      activationConte xt, String[] activationCusto mData)
      at
      System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex ­t
      activationConte xt)
      at
      Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem blyDebugInZone( ­)
      at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object
      state)
      at System.Threadin g.ExecutionCont ext.Run(Executi onContext
      executionContex t, ContextCallback callback, Object state)
      at System.Threadin g.ThreadHelper. ThreadStart()
      >
      Why i can't execute metod open on object db??
      >
      Marcin- Ukryj cytowany tekst -
      >
      - Poka¿ cytowany tekst -
      Ok, but par1,par2,par3 is string.
      par1="Driver=.. .;Server=...;Da tabase=...;"
      par2="user"
      par3="password"

      I add db to watch and od i

      Comment

      • Cor Ligthert [MVP]

        #4
        Re: COM problem

        Martinez,

        I have the idea that the problem as nothing to do with the commands

        Dim db as New BtDatabase()
        db.open(par1,pa r2,par3)

        Can you outcomment them and run again?

        Cor


        "Martinez" <martinez@szcze cinek.net.plsch reef in bericht
        news:1177908194 .722025.313150@ y80g2000hsf.goo glegroups.com.. .
        On 30 Kwi, 06:12, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
        wrote:
        Hi Marcin,
        >
        Probably in par1, par2, par3 has an object to be instanced what is not
        done.
        >
        However for not AdoNet databases the newsgroup
        >
        micorosoft.publ ic.ado.data is probably much better,
        >
        Cor
        >
        "Martinez" <marti...@szcze cinek.net.plsch reef in
        berichtnews:117 7877720.095417. 286730@y80g2000 hsf.googlegroup s.com...
        >
        >
        >
        Hello
        I try declare
        >
        Dim db as New BtDatabase()
        and execute metod
        db.open(par1,pa r2,par3)
        >
        but i get error :
        >
        System.NullRefe renceException was unhandled
        Message="Object reference not set to an instance of an object."
        Source="Microso ft.VisualBasic"
        StackTrace:
        at
        Microsoft.Visua lBasic.Compiler Services.LateBi nding.InternalL ateCall(Object
        o, Type objType, String name, Object[] args, String[] paramnames,
        Boolean[] CopyBack, Boolean IgnoreReturn)
        at
        Microsoft.Visua lBasic.Compiler Services.NewLat eBinding.LateCa ll(Object
        Instance, Type Type, String MemberName, Object[] Arguments, String[]
        ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
        IgnoreReturn)
        at ForteWB.Wczytyw anieWyciagu.Wcz ytywanieWyciagu _Load(Object
        sender, EventArgs e) in C:\Documents and Settings\Marcin \Moje dokumenty
        \Visual Studio 2005\Projects\F orteWB\ForteWB
        \WczytywanieWyc iagu.vb:line 210
        at System.EventHan dler.Invoke(Obj ect sender, EventArgs e)
        at System.Windows. Forms.Form.OnLo ad(EventArgs e)
        at System.Windows. Forms.Form.OnCr eateControl()
        at System.Windows. Forms.Control.C reateControl(Bo olean
        fIgnoreVisible)
        at System.Windows. Forms.Control.C reateControl()
        at System.Windows. Forms.Control.W mShowWindow(Mes sage& m)
        at System.Windows. Forms.Control.W ndProc(Message& m)
        at System.Windows. Forms.Scrollabl eControl.WndPro c(Message& m)
        at System.Windows. Forms.Container Control.WndProc (Message& m)
        at System.Windows. Forms.Form.WmSh owWindow(Messag e& m)
        at System.Windows. Forms.Form.WndP roc(Message& m)
        at
        System.Windows. Forms.Control.C ontrolNativeWin dow.OnMessage(M essage& m)
        at
        System.Windows. Forms.Control.C ontrolNativeWin dow.WndProc(Mes sage& m)
        at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr
        hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
        at
        System.Windows. Forms.UnsafeNat iveMethods.Send Message(HandleR ef hWnd,
        Int32 msg, Int32 wParam, Int32 lParam)
        at System.Windows. Forms.Form.SetV isibleCore(Bool ean value)
        at System.Windows. Forms.Control.s et_Visible(Bool ean value)
        at
        System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo pInner(Int32
        reason, ApplicationCont ext context)
        at
        System.Windows. Forms.Applicati on.ThreadContex t.RunMessageLoo p(Int32
        reason, ApplicationCont ext context)
        at System.Windows. Forms.Applicati on.Run(Applicat ionContext
        context)
        at
        Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.OnRun ­()
        at
        Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.DoApp ­licationModel( )
        at
        Microsoft.Visua lBasic.Applicat ionServices.Win dowsFormsApplic ationBase.Run(S ­tring[]
        commandLine)
        at ForteWB.My.MyAp plication.Main( String[] Args) in 17d14f5c-
        a337-4978-8281-53493378c1071.v b:line 81
        at System.AppDomai n.nExecuteAssem bly(Assembly assembly,
        String[] args)
        at System.Runtime. Hosting.Manifes tRunner.Run(Boo lean
        checkAptModel)
        at System.Runtime. Hosting.Manifes tRunner.Execute AsAssembly()
        at
        System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex ­t
        activationConte xt, String[] activationCusto mData)
        at
        System.Runtime. Hosting.Applica tionActivator.C reateInstance(A ctivationContex ­t
        activationConte xt)
        at
        Microsoft.Visua lStudio.Hosting Process.HostPro c.RunUsersAssem blyDebugInZone( ­)
        at System.Threadin g.ThreadHelper. ThreadStart_Con text(Object
        state)
        at System.Threadin g.ExecutionCont ext.Run(Executi onContext
        executionContex t, ContextCallback callback, Object state)
        at System.Threadin g.ThreadHelper. ThreadStart()
        >
        Why i can't execute metod open on object db??
        >
        Marcin- Ukryj cytowany tekst -
        >
        - Poka¿ cytowany tekst -
        Ok, but par1,par2,par3 is string.
        par1="Driver=.. .;Server=...;Da tabase=...;"
        par2="user"
        par3="password"

        I add db to watch and od i


        Comment

        • Martinez

          #5
          Re: COM problem

          On 30 Kwi, 10:21, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
          wrote:
          Martinez,
          >
          I have the idea that the problem as nothing to do with the commands
          >
          Dim db as New BtDatabase()
          db.open(par1,pa r2,par3)
          >
          Can you outcomment them and run again?
          >
          Cor
          >
          I don't understand, can you explain me that ??

          Marcin

          Comment

          • Cor Ligthert [MVP]

            #6
            Re: COM problem

            -Dim db as New BtDatabase()
            -db.open(par1,pa r2,par3)

            "Martinez" <martinez@szcze cinek.net.plsch reef in bericht
            news:1177927315 .182575.293890@ q75g2000hsh.goo glegroups.com.. .
            On 30 Kwi, 10:21, "Cor Ligthert [MVP]" <notmyfirstn... @planet.nl>
            wrote:
            >Martinez,
            >>
            >I have the idea that the problem as nothing to do with the commands
            >>
            >Dim db as New BtDatabase()
            >db.open(par1,p ar2,par3)
            >>
            >Can you outcomment them and run again?
            >>
            >Cor
            >>
            I don't understand, can you explain me that ??
            >
            Marcin
            >

            Comment

            Working...