Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Iron Speed
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old April 30th, 2004, 04:25 PM
mamamia mamamia is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 4 mamamia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Database Adapter Error in VB.NET

I am getting this error:

An unhandled exception of type 'System.NullReferenceException' occurred in 8.exe
Additional information: Object reference not set to an instance of an object.


Which points at this piece of code:
DBCareerAdapter.SelectCommand.CommandText = strSelect & _
strWhere &
CStr(intminatbats) & " " & _

strOrderBy

Can anyone tell me what the error means or point me in the right direction? My strings are not empty...and I have delcared the adapter beforehand.
Thanks


Reply With Quote
  #2  
Old April 30th, 2004, 05:21 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 14th Plane (11500 - 11999 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,738 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 1 h 41 m 10 sec
Reputation Power: 443
1) This belongs in the .NET area of the forum
2) It would help if you told us what strSelect and strWhere was?
3)
Quote:
Object reference not set to an instance of an object

Means that you are trying to reference an object that you haven't instantiated.
Example
This will throw the above error
Code:
Declare the variable as a type
Dim x As Object

You can't do this because you haven't created the object yet.
x.Property = Value

This will work
Code:
Declare the variable as a type
Dim x As Object

Instantiate it (create it)
x = New Object

x.Property = Value

Reply With Quote
  #3  
Old April 30th, 2004, 06:43 PM
mamamia mamamia is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 4 mamamia User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
1.) Sorry

2.) I have the strselect and where defined right above

DBCareerAdapter.SelectCommand.CommandText = strSelect & _
strWhere & CStr(intminatbats) & " " & _
strOrderBy



Then before the strselect and where i have the adapter defined as
Dim DBCareerAdapter AsNew OleDb.OleDbDataAdapter


thanks for your help

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Database Adapter Error in VB.NET


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway