PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Object ref. not set to an instance of an object
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Object ref. not set to an instance of an object
![]() |
Object ref. not set to an instance of an object |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
hi,
My pgm flow as like this: parent() { a(); b(); |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Cu,
Objects are no program flow but objects. They have to be available in the scoop of the project where you are using it, which is forever in or one level higher than the used scope. The most change you have in this case for your not instanced OleDbCommand object which you have probably created in a try block but that we cannot see. I hope this gives an idea Cor <cu.4m.srinivas@gmail.com> schreef in bericht news:1158033195.598316.190950@i3g2000cwc.googlegroups.com... > hi, > > My pgm flow as like this: > > parent() > { > a(); > b(); > . > . > > } > > a() b() > { { > try{} try{ } > > catch{} catch{} > > } } > > My pgm finishes with a(), and while executin b(), the control transfers > to the catch-blk of a() > When i try to print the stackTrace in the catch part of a() i get this: > > "obj. ref. not set..." at > System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& > executeResult) > at > System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior > behavior, String method) > at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior > behavior) > at <namespace>.<classname>.a() > > I cudnt find any null object being accessed in a(), and strangely i > dont get this exception, when the pgm is executing a() -- how come? > > a() : Query operation > b(): FTP operations ( i.e. file access to the remote server) > > Could you please help me out in this ?...thx in advance > > Thanks > Freak > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

