Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB.NET / April 2007

Tip: Looking for answers? Try searching our database.

COM problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martinez - 29 Apr 2007 21:15 GMT
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
Cor Ligthert [MVP] - 30 Apr 2007 05:12 GMT
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

> Hello
> I try declare
[quoted text clipped - 84 lines]
>
> Marcin
Martinez - 30 Apr 2007 05:43 GMT
On 30 Kwi, 06:12, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
> Hi Marcin,
>
[quoted text clipped - 96 lines]
>
> - 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
Cor Ligthert [MVP] - 30 Apr 2007 09:21 GMT
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

On 30 Kwi, 06:12, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
> Hi Marcin,
>
[quoted text clipped - 100 lines]
>
> - 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
Martinez - 30 Apr 2007 11:01 GMT
On 30 Kwi, 10:21, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
wrote:
> Martinez,
>
[quoted text clipped - 6 lines]
>
> Cor

I don't understand, can you explain me that ??

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

> On 30 Kwi, 10:21, "Cor Ligthert [MVP]" <notmyfirstn...@planet.nl>
> wrote:
[quoted text clipped - 12 lines]
>
> Marcin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.