Click here to Skip to main content
15,903,388 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 6:38
Aptiva Dave19-Feb-08 6:38 
GeneralRe: Object reference not set to an instance of an object error Pin
cstrader23219-Feb-08 6:47
cstrader23219-Feb-08 6:47 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 6:50
Aptiva Dave19-Feb-08 6:50 
GeneralRe: Object reference not set to an instance of an object error Pin
cstrader23219-Feb-08 7:08
cstrader23219-Feb-08 7:08 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 7:32
Aptiva Dave19-Feb-08 7:32 
GeneralRe: Object reference not set to an instance of an object error Pin
Dave Kreskowiak19-Feb-08 8:44
mveDave Kreskowiak19-Feb-08 8:44 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 8:47
Aptiva Dave19-Feb-08 8:47 
GeneralRe: Object reference not set to an instance of an object error Pin
Dave Kreskowiak19-Feb-08 11:03
mveDave Kreskowiak19-Feb-08 11:03 
Stepping through the code line by line will tell you where the error is. All you have to do is set a breakpoint on the first line in the method code, then run your app. The debugger will stop the code when it hits the breakpoint. Then all you have to do is single-step until you reach the error.

Aptiva Dave wrote:
Dim pubs As New SqlConnection(ConfigurationManager.ConnectionStrings("WIA_Report_Builder.My.MySettings.wiaConnectionString").ConnectionString)


The most obious failure here that can cause the error you're seeing is that ConfigurationManager.ConnectionStrings("WIA_Report_Builder.My.MySettings.wiaConnectionString") may have returned Nothing, on which you're trying to retrieve the value of the ConnectionString property.

From the looks of things, you're having problems retrieving the connection string from a configuration file, correct??

Also, you've (tried to) created a couple of SqlConnection objects. You only need one.



A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007




GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 11:09
Aptiva Dave19-Feb-08 11:09 
GeneralRe: Object reference not set to an instance of an object error Pin
cstrader23219-Feb-08 12:35
cstrader23219-Feb-08 12:35 
GeneralRe: Object reference not set to an instance of an object error Pin
Aptiva Dave19-Feb-08 17:26
Aptiva Dave19-Feb-08 17:26 
GeneralRe: Object reference not set to an instance of an object error Pin
Dave Kreskowiak19-Feb-08 14:16
mveDave Kreskowiak19-Feb-08 14:16 
QuestionModify Form1 control from BGW on Form 2? Pin
cstrader23219-Feb-08 3:28
cstrader23219-Feb-08 3:28 
AnswerRe: Modify Form1 control from BGW on Form 2? Pin
cstrader23219-Feb-08 12:32
cstrader23219-Feb-08 12:32 
AnswerRe: Modify Form1 control from BGW on Form 2? Pin
Dave Kreskowiak20-Feb-08 5:10
mveDave Kreskowiak20-Feb-08 5:10 
GeneralRe: Modify Form1 control from BGW on Form 2? Pin
cstrader23220-Feb-08 5:49
cstrader23220-Feb-08 5:49 
GeneralBroadcasting audio Over LAN Pin
Paramhans Dubey19-Feb-08 2:29
professionalParamhans Dubey19-Feb-08 2:29 
GeneralRe: Broadcasting audio Over LAN Pin
Dave Kreskowiak20-Feb-08 5:04
mveDave Kreskowiak20-Feb-08 5:04 
Generalnot storing correct value in sql server from a vb.net application Pin
vb_buddy19-Feb-08 0:22
vb_buddy19-Feb-08 0:22 
GeneralRe: not storing correct value in sql server from a vb.net application Pin
Colin Angus Mackay19-Feb-08 4:40
Colin Angus Mackay19-Feb-08 4:40 
GeneralVB/SQL Question(Dave) Pin
Vimalsoft(Pty) Ltd18-Feb-08 22:32
professionalVimalsoft(Pty) Ltd18-Feb-08 22:32 
GeneralRe: VB/SQL Question(Dave) Pin
Dave Kreskowiak20-Feb-08 5:01
mveDave Kreskowiak20-Feb-08 5:01 
AnswerRe: VB/SQL Question(Dave) Pin
Vimalsoft(Pty) Ltd21-Feb-08 1:28
professionalVimalsoft(Pty) Ltd21-Feb-08 1:28 
GeneralWord content not Properly shown in RichTextbox Pin
Rupesh Kumar Swami18-Feb-08 21:28
Rupesh Kumar Swami18-Feb-08 21:28 
GeneralRe: Word content not Properly shown in RichTextbox Pin
Christian Graus18-Feb-08 22:03
protectorChristian Graus18-Feb-08 22:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.