Cor Ligthert [MVP]
6/2/2008 5:06:00 PM
Jordi,
I understand it works now, you showed DataTable this is a property of the
non strongly typed DataSet, so that would have never OK. Any other name was
however possible as you show now.
Cor
"JordiXip" <JordiXip@discussions.microsoft.com> schreef in bericht
news:2C4B56CD-1C72-41FE-AC67-EC8529EBFE4A@microsoft.com...
> Hello Cor,
>
> I explain a little better the problem.
>
> I've got a Form, with two EditBoxes, and a Button. When I click the button
> I
> would like to check:
>
> a. If in users table (database.mdb), exists any records.
>
> b. A do/while to look for the user given in the Edit1Box1, and check the
> password.
>
> I try for this, the following:
>
> 1. Tools, Connect to Database, Access file, mdb. Ok, test succedded.
>
> 2. Add a bindingsource1, and created a datasource.
>
> At this point, in my form there are a bindingsource1, and an
> onlyxxxxxdataset2.
>
> 3. In datamember propertie for bindingsource I write name's table.
>
> Here, adds a tableTableAdapter.
>
> And now, here's my problem.
>
> How could I check the number of records in the table?
>
> Sorry, I tried again with this and it works...
>
> private void button1_Click(object sender, EventArgs e)
> {
> int numero=onlyXXXXxSet2.PXXXXXXXs.Count;
>
> }
>
> private void Form3_Load(object sender, EventArgs e)
> {
> // TODO: This line of code loads data into the
> 'onlyXXXXXX2.PXXXXX' table. You can move, or remove it, as needed.
> this.XXXXTableAdapter.Fill(this.onlyXXXXXXSet2.PXXXXXXs);
>
>
>
>
>
>
>
>
>
>
>
> "Cor Ligthert[MVP]" wrote:
>
>> Jordi,
>>
>> Most probably in my idea
>> > numero = usuarios.Tables.Count;
>> >
>> numero = usuarios.Tables[0].Count;
>>
>> By the way I would not know a construction that would create this as a
>> Strongly Typed Dataset, while the construction created by you above
>> should
>> give in normal situations (as you did not build your own collection
>> around a
>> datatable) give an error.
>>
>> Cor
>>