Home All Groups Group Topic Archive Search About
Author
29 Apr 2007 8:15 PM
Martinez
Hello
I try declare

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

but i get error :

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Microsoft.VisualBasic"
  StackTrace:
       at
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames,
Boolean[] CopyBack, Boolean IgnoreReturn)
       at
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn)
       at ForteWB.WczytywanieWyciagu.WczytywanieWyciagu_Load(Object
sender, EventArgs e) in C:\Documents and Settings\Marcin\Moje dokumenty
\Visual Studio 2005\Projects\ForteWB\ForteWB
\WczytywanieWyciagu.vb:line 210
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at
System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd,
Int32 msg, Int32 wParam, Int32 lParam)
       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
       at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext
context)
       at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine)
       at ForteWB.My.MyApplication.Main(String[] Args) in 17d14f5c-
a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain.nExecuteAssembly(Assembly assembly,
String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean
checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext, String[] activationCustomData)
       at
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext)
       at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object
state)
       at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()


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

Marcin

Author
30 Apr 2007 4:12 AM
Cor Ligthert [MVP]
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.public.ado.data is probably much better,

Cor


Show quoteHide quote
"Martinez" <marti***@szczecinek.net.pl> schreef in bericht
news:1177877720.095417.286730@y80g2000hsf.googlegroups.com...
> Hello
> I try declare
>
> Dim db as New BtDatabase()
> and execute metod
> db.open(par1,par2,par3)
>
> but i get error :
>
> System.NullReferenceException was unhandled
>  Message="Object reference not set to an instance of an object."
>  Source="Microsoft.VisualBasic"
>  StackTrace:
>       at
> Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
> o, Type objType, String name, Object[] args, String[] paramnames,
> Boolean[] CopyBack, Boolean IgnoreReturn)
>       at
> Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> IgnoreReturn)
>       at ForteWB.WczytywanieWyciagu.WczytywanieWyciagu_Load(Object
> sender, EventArgs e) in C:\Documents and Settings\Marcin\Moje dokumenty
> \Visual Studio 2005\Projects\ForteWB\ForteWB
> \WczytywanieWyciagu.vb:line 210
>       at System.EventHandler.Invoke(Object sender, EventArgs e)
>       at System.Windows.Forms.Form.OnLoad(EventArgs e)
>       at System.Windows.Forms.Form.OnCreateControl()
>       at System.Windows.Forms.Control.CreateControl(Boolean
> fIgnoreVisible)
>       at System.Windows.Forms.Control.CreateControl()
>       at System.Windows.Forms.Control.WmShowWindow(Message& m)
>       at System.Windows.Forms.Control.WndProc(Message& m)
>       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
>       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
>       at System.Windows.Forms.Form.WmShowWindow(Message& m)
>       at System.Windows.Forms.Form.WndProc(Message& m)
>       at
> System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
>       at
> System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
>       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
> hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
>       at
> System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd,
> Int32 msg, Int32 wParam, Int32 lParam)
>       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
>       at System.Windows.Forms.Control.set_Visible(Boolean value)
>       at
> System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
> reason, ApplicationContext context)
>       at
> System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
> reason, ApplicationContext context)
>       at System.Windows.Forms.Application.Run(ApplicationContext
> context)
>       at
> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
>       at
> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
>       at
> Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
> commandLine)
>       at ForteWB.My.MyApplication.Main(String[] Args) in 17d14f5c-
> a337-4978-8281-53493378c1071.vb:line 81
>       at System.AppDomain.nExecuteAssembly(Assembly assembly,
> String[] args)
>       at System.Runtime.Hosting.ManifestRunner.Run(Boolean
> checkAptModel)
>       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
>       at
> System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
> activationContext, String[] activationCustomData)
>       at
> System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
> activationContext)
>       at
> Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
>       at System.Threading.ThreadHelper.ThreadStart_Context(Object
> state)
>       at System.Threading.ExecutionContext.Run(ExecutionContext
> executionContext, ContextCallback callback, Object state)
>       at System.Threading.ThreadHelper.ThreadStart()
>
>
> Why i can't execute metod open on object db??
>
> Marcin
>
Author
30 Apr 2007 4:43 AM
Martinez
Show quote Hide quote
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.public.ado.data is probably much better,
>
> Cor
>
> "Martinez" <marti***@szczecinek.net.pl> schreef in berichtnews:1177877720..095417.286***@y80g2000hsf.googlegroups.com...
>
>
>
> > Hello
> > I try declare
>
> > Dim db as New BtDatabase()
> > and execute metod
> > db.open(par1,par2,par3)
>
> > but i get error :
>
> > System.NullReferenceException was unhandled
> >  Message="Object reference not set to an instance of an object."
> >  Source="Microsoft.VisualBasic"
> >  StackTrace:
> >       at
> > Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
> > o, Type objType, String name, Object[] args, String[] paramnames,
> > Boolean[] CopyBack, Boolean IgnoreReturn)
> >       at
> > Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object
> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> > IgnoreReturn)
> >       at ForteWB.WczytywanieWyciagu.WczytywanieWyciagu_Load(Object
> > sender, EventArgs e) in C:\Documents and Settings\Marcin\Moje dokumenty
> > \Visual Studio 2005\Projects\ForteWB\ForteWB
> > \WczytywanieWyciagu.vb:line 210
> >       at System.EventHandler.Invoke(Object sender, EventArgs e)
> >       at System.Windows.Forms.Form.OnLoad(EventArgs e)
> >       at System.Windows.Forms.Form.OnCreateControl()
> >       at System.Windows.Forms.Control.CreateControl(Boolean
> > fIgnoreVisible)
> >       at System.Windows.Forms.Control.CreateControl()
> >       at System.Windows.Forms.Control.WmShowWindow(Message& m)
> >       at System.Windows.Forms.Control.WndProc(Message& m)
> >       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
> >       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
> >       at System.Windows.Forms.Form.WmShowWindow(Message& m)
> >       at System.Windows.Forms.Form.WndProc(Message& m)
> >       at
> > System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
> >       at
> > System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
> >       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
> > hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
> >       at
> > System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd,
> > Int32 msg, Int32 wParam, Int32 lParam)
> >       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
> >       at System.Windows.Forms.Control.set_Visible(Boolean value)
> >       at
> > System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
> > reason, ApplicationContext context)
> >       at
> > System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
> > reason, ApplicationContext context)
> >       at System.Windows.Forms.Application.Run(ApplicationContext
> > context)
> >       at
> > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun­()
> >       at
> > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApp­licationModel()
> >       at
> > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(S­tring[]
> > commandLine)
> >       at ForteWB.My.MyApplication.Main(String[] Args) in 17d14f5c-
> > a337-4978-8281-53493378c1071.vb:line 81
> >       at System.AppDomain.nExecuteAssembly(Assembly assembly,
> > String[] args)
> >       at System.Runtime.Hosting.ManifestRunner.Run(Boolean
> > checkAptModel)
> >       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
> >       at
> > System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContex­t
> > activationContext, String[] activationCustomData)
> >       at
> > System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContex­t
> > activationContext)
> >       at
> > Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone(­)
> >       at System.Threading.ThreadHelper.ThreadStart_Context(Object
> > state)
> >       at System.Threading.ExecutionContext.Run(ExecutionContext
> > executionContext, ContextCallback callback, Object state)
> >       at System.Threading.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=...;Database=...;"
par2="user"
par3="password"

I add db to watch and od i
Author
30 Apr 2007 8:21 AM
Cor Ligthert [MVP]
Martinez,

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

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

Can you outcomment them and run again?

Cor


Show quoteHide quote
"Martinez" <marti***@szczecinek.net.pl> schreef in bericht
news:1177908194.722025.313150@y80g2000hsf.googlegroups.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.public.ado.data is probably much better,
>
> Cor
>
> "Martinez" <marti***@szczecinek.net.pl> schreef in
> berichtnews:1177877720.095417.286***@y80g2000hsf.googlegroups.com...
>
>
>
> > Hello
> > I try declare
>
> > Dim db as New BtDatabase()
> > and execute metod
> > db.open(par1,par2,par3)
>
> > but i get error :
>
> > System.NullReferenceException was unhandled
> >  Message="Object reference not set to an instance of an object."
> >  Source="Microsoft.VisualBasic"
> >  StackTrace:
> >       at
> > Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
> > o, Type objType, String name, Object[] args, String[] paramnames,
> > Boolean[] CopyBack, Boolean IgnoreReturn)
> >       at
> > Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object
> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> > IgnoreReturn)
> >       at ForteWB.WczytywanieWyciagu.WczytywanieWyciagu_Load(Object
> > sender, EventArgs e) in C:\Documents and Settings\Marcin\Moje dokumenty
> > \Visual Studio 2005\Projects\ForteWB\ForteWB
> > \WczytywanieWyciagu.vb:line 210
> >       at System.EventHandler.Invoke(Object sender, EventArgs e)
> >       at System.Windows.Forms.Form.OnLoad(EventArgs e)
> >       at System.Windows.Forms.Form.OnCreateControl()
> >       at System.Windows.Forms.Control.CreateControl(Boolean
> > fIgnoreVisible)
> >       at System.Windows.Forms.Control.CreateControl()
> >       at System.Windows.Forms.Control.WmShowWindow(Message& m)
> >       at System.Windows.Forms.Control.WndProc(Message& m)
> >       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
> >       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
> >       at System.Windows.Forms.Form.WmShowWindow(Message& m)
> >       at System.Windows.Forms.Form.WndProc(Message& m)
> >       at
> > System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
> >       at
> > System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
> >       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
> > hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
> >       at
> > System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd,
> > Int32 msg, Int32 wParam, Int32 lParam)
> >       at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
> >       at System.Windows.Forms.Control.set_Visible(Boolean value)
> >       at
> > System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
> > reason, ApplicationContext context)
> >       at
> > System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
> > reason, ApplicationContext context)
> >       at System.Windows.Forms.Application.Run(ApplicationContext
> > context)
> >       at
> > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun­()
> >       at
> > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApp­licationModel()
> >       at
> > Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(S­tring[]
> > commandLine)
> >       at ForteWB.My.MyApplication.Main(String[] Args) in 17d14f5c-
> > a337-4978-8281-53493378c1071.vb:line 81
> >       at System.AppDomain.nExecuteAssembly(Assembly assembly,
> > String[] args)
> >       at System.Runtime.Hosting.ManifestRunner.Run(Boolean
> > checkAptModel)
> >       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
> >       at
> > System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContex­t
> > activationContext, String[] activationCustomData)
> >       at
> > System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContex­t
> > activationContext)
> >       at
> > Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone(­)
> >       at System.Threading.ThreadHelper.ThreadStart_Context(Object
> > state)
> >       at System.Threading.ExecutionContext.Run(ExecutionContext
> > executionContext, ContextCallback callback, Object state)
> >       at System.Threading.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=...;Database=...;"
par2="user"
par3="password"

I add db to watch and od i
Author
30 Apr 2007 10:01 AM
Martinez
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,par2,par3)
>
> Can you outcomment them and run again?
>
> Cor
>
I don't understand, can you explain me that ??

Marcin
Author
30 Apr 2007 11:29 AM
Cor Ligthert [MVP]
-Dim db as New BtDatabase()
-db.open(par1,par2,par3)

Show quoteHide quote
"Martinez" <marti***@szczecinek.net.pl> schreef in bericht
news:1177927315.182575.293890@q75g2000hsh.googlegroups.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,par2,par3)
>>
>> Can you outcomment them and run again?
>>
>> Cor
>>
> I don't understand, can you explain me that ??
>
> Marcin
>