Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object reference not set to an instance of an object
Message
From
21/03/2004 12:50:03
 
 
To
21/03/2004 12:36:29
General information
Forum:
ASP.NET
Category:
Databases
Miscellaneous
Thread ID:
00888294
Message ID:
00888296
Views:
14
This message has been marked as the solution to the initial question of the thread.
How do you know Table "Temp" exists? I don't think it does, given the code you've shown. Try this instead:
...
      Dim loDT As New OleDbDataAdapter("select * from Login", _
      "Provider=VFPOLEDB.1;Data Source=D:\Login.dbf;Password='';Collating Sequence=MACHINE")
...
      loDT.Fill(loData, "Temp")
~~Bonnie

>I have the following code:
>
>
>      Dim loData As DataSet
>      loData = New DataSet
>      Dim loDT As New OleDbDataAdapter("select * from Login into cursor Temp", _
>      "Provider=VFPOLEDB.1;Data Source=D:\Login.dbf;Password='';Collating Sequence=MACHINE")
>
>      loDT.Fill(loData)
>
>      ' Get it into a view
>      Dim loView As DataView
>      loView = loData.Tables("Temp").DefaultView
>
>
>I get the message "Object reference not set to an instance of an object" on the last line. The cursor Temp exists. So, why is it not recognized?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform