|
 |
aspx_beginners thread: dataSet.Recordcount
Message #1 by Simon Hargreaves <Simon.Hargreaves@c...> on Mon, 29 Jul 2002 10:14:07 +0100
|
|
Hello All
I am attempting to access an Access database, the connection goes through
fine, however
when I put the data into a dataset, does anyone know how to get a
recordcount ? My code, below throws errors:
MyVariable = MyDataSet.recordCount
Any insights gratefully received.
Simon
This e-mail message is confidential and for use by the addressee only. If
the message is received by anyone other than the addressee, please return
the message to the sender by replying to it and then delete the message from
your computer. Internet e-mails are not necessarily secure. DeLaRue does not
accept responsibility for changes made to this message after it was sent.
Any views or opinions presented are those of the author and do not
necessarily represent those of DeLaRue or its associated companies.
Message #2 by "Sri Vidya" <svsvidya@i...> on Mon, 29 Jul 2002 16:28:58 +0530
|
|
Hi Simon,
To Fetch the recordcount when the table is bound to a DataSet, the
correct syntax is as follows. Here, I have considered the Northwind
Database and Products Table.
myDataSet.Tables("Products").Rows.Count
Alternately, you can use
myDataSet.Tables(index).Rows.Count,
If you want to fetch the table name dynamically.
This should work.
Cheers,
Vidya.
On Mon, 29 Jul 2002 10:14:07 +0100
Simon Hargreaves <Simon.Hargreaves@c...> wrote:
>Hello All
>
>I am attempting to access an Access database, the connection goes
>through
>fine, however
>when I put the data into a dataset, does anyone know how to get a
>recordcount ? My code, below throws errors:
>
> MyVariable = MyDataSet.recordCount
>
>Any insights gratefully received.
>
>Simon
>
>This e-mail message is confidential and for use by the addressee
>only. If
>the message is received by anyone other than the addressee, please
>return
>the message to the sender by replying to it and then delete the
>message from
>your computer. Internet e-mails are not necessarily secure. DeLaRue
>does not
>accept responsibility for changes made to this message after it was
>sent.
>Any views or opinions presented are those of the author and do not
>necessarily represent those of DeLaRue or its associated companies.
>
>
---------------------------------------------
http://mail.indiainfo.com
India's first ISO certified portal
Check world time at http://time.indiainfo.com
Message #3 by "Nick" <nick@g...> on Mon, 29 Jul 2002 18:42:56 +0700
|
|
try this u will get the recordcount in intCount
Dim cmdScalar As New SqlCommand(spvimagecount, myConnection)
Dim intCount As Integer = cmdScalar.ExecuteScalar
----- Original Message -----
From: "Simon Hargreaves" <Simon.Hargreaves@c...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Monday, July 29, 2002 4:14 PM
Subject: [aspx_beginners] dataSet.Recordcount
> Hello All
>
> I am attempting to access an Access database, the connection goes through
> fine, however
> when I put the data into a dataset, does anyone know how to get a
> recordcount ? My code, below throws errors:
>
> MyVariable = MyDataSet.recordCount
>
> Any insights gratefully received.
>
> Simon
>
> This e-mail message is confidential and for use by the addressee only. If
> the message is received by anyone other than the addressee, please return
> the message to the sender by replying to it and then delete the message
from
> your computer. Internet e-mails are not necessarily secure. DeLaRue does
not
> accept responsibility for changes made to this message after it was sent.
> Any views or opinions presented are those of the author and do not
> necessarily represent those of DeLaRue or its associated companies.
>
>
>
Message #4 by Simon Hargreaves <Simon.Hargreaves@c...> on Mon, 29 Jul 2002 13:35:30 +0100
|
|
Sri,
Brilliant ! I was using .RecordCount as in VB6 and Access.
Cheers mate
Simon
-----Original Message-----
From: Sri Vidya [mailto:svsvidya@i...]
Sent: 29 July 2002 11:59
To: aspx_beginners
Subject: [aspx_beginners] Re: dataSet.Recordcount
Hi Simon,
To Fetch the recordcount when the table is bound to a DataSet, the
correct syntax is as follows. Here, I have considered the Northwind
Database and Products Table.
myDataSet.Tables("Products").Rows.Count
Alternately, you can use
myDataSet.Tables(index).Rows.Count,
If you want to fetch the table name dynamically.
This should work.
Cheers,
Vidya.
On Mon, 29 Jul 2002 10:14:07 +0100
Simon Hargreaves <Simon.Hargreaves@c...> wrote:
>Hello All
>
>I am attempting to access an Access database, the connection goes
>through
>fine, however
>when I put the data into a dataset, does anyone know how to get a
>recordcount ? My code, below throws errors:
>
> MyVariable = MyDataSet.recordCount
>
>Any insights gratefully received.
>
>Simon
>
>This e-mail message is confidential and for use by the addressee
>only. If
>the message is received by anyone other than the addressee, please
>return
>the message to the sender by replying to it and then delete the
>message from
>your computer. Internet e-mails are not necessarily secure. DeLaRue
>does not
>accept responsibility for changes made to this message after it was
>sent.
>Any views or opinions presented are those of the author and do not
>necessarily represent those of DeLaRue or its associated companies.
>
>
---------------------------------------------
http://mail.indiainfo.com
India's first ISO certified portal
Check world time at http://time.indiainfo.com
Message #5 by "Sri Vidya" <svsvidya@i...> on Tue, 30 Jul 2002 16:28:58 +0530
|
|
Hi Simon,
Glad that helped. Thanks.
Vidya.
On Mon, 29 Jul 2002 13:35:30 +0100
Simon Hargreaves <Simon.Hargreaves@c...> wrote:
>Sri,
>
>Brilliant ! I was using .RecordCount as in VB6 and Access.
>
>Cheers mate
>
>Simon
>
>-----Original Message-----
>From: Sri Vidya [mailto:svsvidya@i...]
>Sent: 29 July 2002 11:59
>To: aspx_beginners
>Subject: [aspx_beginners] Re: dataSet.Recordcount
>
>
>Hi Simon,
>
>To Fetch the recordcount when the table is bound to a DataSet, the
>correct syntax is as follows. Here, I have considered the Northwind
>Database and Products Table.
>
>myDataSet.Tables("Products").Rows.Count
>
>Alternately, you can use
>
>myDataSet.Tables(index).Rows.Count,
>
>If you want to fetch the table name dynamically.
>
>This should work.
>
>Cheers,
>Vidya.
>
>
>On Mon, 29 Jul 2002 10:14:07 +0100
> Simon Hargreaves <Simon.Hargreaves@c...> wrote:
>>Hello All
>>
>>I am attempting to access an Access database, the connection goes
>>through
>>fine, however
>>when I put the data into a dataset, does anyone know how to get a
>>recordcount ? My code, below throws errors:
>>
>> MyVariable = MyDataSet.recordCount
>>
>>Any insights gratefully received.
>>
>>Simon
>>
>>This e-mail message is confidential and for use by the addressee
>>only. If
>>the message is received by anyone other than the addressee, please
>>return
>>the message to the sender by replying to it and then delete the
>>message from
>>your computer. Internet e-mails are not necessarily secure. DeLaRue
>>does not
>>accept responsibility for changes made to this message after it was
>>sent.
>>Any views or opinions presented are those of the author and do not
>>necessarily represent those of DeLaRue or its associated companies.
>>
>>
>
>---------------------------------------------
>http://mail.indiainfo.com
>India's first ISO certified portal
>Check world time at http://time.indiainfo.com
>
>
---------------------------------------------
http://mail.indiainfo.com
India's first ISO certified portal
Check world time at http://time.indiainfo.com
|
|
 |