Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dataset
Message
De
22/12/2005 16:36:27
 
 
À
22/12/2005 16:29:54
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Titre:
Versions des environnements
OS:
Windows Server 2003
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01079635
Message ID:
01080361
Vues:
38
You don't say which line your error occurs on, but I'm betting it's either (or both):
                oleadapter.Fill(ds1)
or
                ds.Tables("users").PrimaryKey = New DataColumn() {ds.Tables("users").Columns("user")}
I don't see where you've instantiated either ds or ds1. And, you should be using the same DataSet. You need something like this:
                DataSet ds = New DataSet
                oleadapter.Fill(ds)
                ds.Tables("users").PrimaryKey = New DataColumn() {ds.Tables("users").Columns("user")}
~~Bonnie
>tm = ConfigurationSettings.AppSettings("telemagic" & i.ToString) & "common"
>
>                oleconect.ConnectionString = "data source =" & tm & proveedor
>                olecommand.CommandText = "select user,name from users order by user"
>
>                oleadapter.SelectCommand = olecommand
>                olecommand.Connection = oleconect
>                oleadapter.Fill(ds1)
>                ds.Tables("users").PrimaryKey = New DataColumn() {ds.Tables("users").Columns("user")}
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