473,320 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Record number when using SqlCeResultSet

Does anybody know how to get a number of rows when using DataTable
with datasource that is an SqlCeResultSet.
I use the following code to "select" the data into DataTable:
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Customer";
SqlCeResultSet rs = cmd.ExecuteResultSet(ResultSetOptions.Scrollable);
dgrData.DataSource = rs; //dgrData is DataTable

Sep 5 '07 #1
1 3357
Hi,

If it's a server side cursor you only know the size of it when the cursor is
closed.
In the meantime you cannot
In the same way I think it's ont a good idea to use it as a datasource, or
if you do so make sure to close the connection after.

<uv****@gmail.comwrote in message
news:11*********************@w3g2000hsg.googlegrou ps.com...
Does anybody know how to get a number of rows when using DataTable
with datasource that is an SqlCeResultSet.
I use the following code to "select" the data into DataTable:
SqlCeCommand cmd = conn.CreateCommand();
cmd.CommandText = "SELECT * FROM Customer";
SqlCeResultSet rs = cmd.ExecuteResultSet(ResultSetOptions.Scrollable);
dgrData.DataSource = rs; //dgrData is DataTable

Sep 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Rick | last post by:
Hi all, Is there a MySQL function to get the first record through a query? I would like to open a page of client records with the first one shown. The other records can be accessed from a...
9
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
4
by: Skully Matjas | last post by:
I am using the following code (created by the wizard) to allow to bring my form to a particular entery. But when I edit the entery (ex: put new information into a blank cell), it puts that record...
1
by: Skully Matjas | last post by:
Thank you for getting back to me. I am very new at this so i didnot understand what you said, here i will give as much cetails as possible: 1) The combo box i am using is combox39 2) I imported...
0
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the...
1
by: Scott269 | last post by:
So I've got an old MS Works database I imported into Access. I needed a primary key so I created a record number field that was just the record number I manually inserted when I entered it in the...
3
by: sean | last post by:
I have a table with fixed row of records SORTED by DATE using ADO pagination method. The user can click a link in one table cell and go to another page to modify the record. Once the updated record...
3
by: CourtGuy | last post by:
Hi Folks, I've got a problem that's been confounding me for months. I work for a criminal court, and I'm trying to set up an Access database to track petitions filed by criminal defendants. ...
5
by: Destiny111 | last post by:
I have the following questions: 1., Can I mapping datas in a datagrid binded to a sqlceresultset? Fe.: In the database there is "1" in a field, but i would like to display "yes" instead of in the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.