Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dataset
Message
From
22/12/2005 16:36:27
 
 
To
22/12/2005 16:29:54
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
Environment versions
OS:
Windows Server 2003
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01079635
Message ID:
01080361
Views:
39
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform