Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object reference not set to an instance of an object
Message
De
21/03/2004 12:50:03
 
 
À
21/03/2004 12:36:29
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
00888294
Message ID:
00888296
Vues:
15
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform