Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data binding error
Message
 
To
02/04/2008 00:51:09
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01307537
Message ID:
01307633
Views:
12
That did it! Thanks Mike!



>>I'm trying to bind a field in a dataset to a field on a form:
>>
>>
>>private void Form1_Load(object sender, EventArgs e)
>>{
>>    Marois.UserDataAccess oUserData = new Marois.UserDataAccess();
>>
>>    oUserData.bTrustedConnection = true;
>>    oUserData.sServer = "PC108\\SQLEXPRESS";
>>    oUserData.sDatabase = "Test";
>>
>>    DataSet oDataSet = oUserData.GetUser(5, "UserInfo");  // Get record 5 into a DS called UserInfo
>>
>>    int iRowCount = oDataSet.Tables[0].Rows.Count;
>>
>>    if (iRowCount > 0)
>>    {
>>        txtFullName.DataBindings.Add("Text", oDataSet, "UserData.FullName");
>>    }
>>
>>}
>>
>>
>>
>>It throws "Child list for field UserData cannot be created"
>>
>>Can someone help a newby?
>
>Just a guess, I am freehanding and half asleep so it might not even make sense. Change your databinding line to this:
>
>
>txtFullName.DataBindings.Add("Text", oDataSet.Tables(0), "FullName");
>
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform