Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data binding error
Message
 
À
02/04/2008 00:51:09
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01307537
Message ID:
01307633
Vues:
11
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform