Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have created an application in C# which in working fine on local machince(XP) but when I install that program on network it is unable to connect to database and it throws error:
XML
System.NullReferenceException: Object reference not set to an instance of an object.
   at QualiChem.PartyDetails.PartyDetails_Load(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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------

I am working in a network of 5 pc interconnected. All pc having windows Xp. What should I do?
Please help.
Posted
Updated 3-Aug-10 1:24am
v2
Comments
Simon_Whale 3-Aug-10 6:35am    
With out seeing code, I would suggest that you set a break point and step through your code to see where its falling over.

As something in your partyDetails_Load is not working properly either getting a variable or a variable being set
R. Giskard Reventlov 3-Aug-10 6:48am    
Reason for my vote of 1
Cross post: do not ask the same question in 2 forums.
William Winner 3-Aug-10 13:47pm    
Where is the database located. My guess is it's on the local machine and needs to be on the network, or if it's on the network, then the other machines may not have mapped the drives with the same drive letter.

Your code is broken because it sucks. Fix your code, so that it's written properly, and this error will never occur. Fix your network permissions or your connection string AFTER you fix your code, no DB error should result in this problem.
 
Share this answer
 
Comments
Nikhil Bhivgade 3-Aug-10 7:22am    
it work fine on local machine what should i do
Object reference not set to an instance of an object
This error generally occurs when you try to access certain property of an object where objects value is NULL.

Use DEBUGGER and see where is that and handle it. You should be able to do it. Might be in your local system that object has some value but not on server. You need to check and fix that.
 
Share this answer
 
actually i am using integrated security=sspi which is not allowing to do when i am pass user name as password it allowed

i think xp won't allow integrated security over network
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900