Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO Recordset: Object reference not set to an instance of an object

Status
Not open for further replies.

bernie321

Programmer
Jan 7, 2004
477
0
0
GB
Hi

We have a project that runs fine on our development machine but when we deploy it and run one of the sql statements it returns the error:

Object reference not set to an instance of an object
Error Number: 91

I have narrowed it down to when it is retreiving the first value from the recordset using rs.fields(0).value

The odd thing is that the SQL Statement runs fine directly against the database, the db connectivity is fine as other statements run without problem and they use the same execution code.

Its driving me mad.

My development machine is Windows XP Pro and the deployment machine is Windows 2k3 Server (SBS 2k3).

Any help would be much appreciated.

Thanks
B
 
are you using asp or asp.net, ADO or ADO.NET?
if asp.net with ado NOT ado.net you will need a copy of adodb.dll in your bin folder
 
Hi Netctl

Thanks for your post.

I am using ADO, not ado.net and I already have a copy of adodb.dll in my bin folder.

Thanks
B
 
Rather than using a recordset, I would suggest using a DataReader ot DataTable as in faq855-5662

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top