Update and re-Select when not using a stored procedure

E

Earl

For my desktop apps, I create stored procedures for all of my
update/insert/delete commands. I refresh the data with a "re-Select" as part
of the stored procedure. However, with the Compact Framework and SQLCE, you
cannot use stored procedures. Thus my question is, how best to implement the
"re-Select" in ADO.Net when not using a stored procedure?
 
K

Kevin Yu [MSFT]

Hi Earl,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to know how to refresh data in
DataSet when stored procedures cannot be used. If there is any
misunderstanding, please feel free to let me know.

As far as I know, SQL CE doesn't support stored procedures and batch SQL
statements. It might be hard for us to refresh data in DataSet by
re-Selecting. I think SQL CE is not suitable for storing data as the main
database. It is only used to cache data. You can try to check the following
article: Caching Data with SQL Server CE to find more answers.

http://www.windowsitlibrary.com/Content/1016/05/2.html

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
A

Antonio Mazzeo

Earl said:
For my desktop apps, I create stored procedures for all of my
update/insert/delete commands. I refresh the data with a "re-Select" as part
of the stored procedure. However, with the Compact Framework and SQLCE, you
cannot use stored procedures. Thus my question is, how best to implement the
"re-Select" in ADO.Net when not using a stored procedure?

UPDATE TABLE SET columnn = value WHERE ID = originalRowID
SELECT column FROM TABLE WHERE ID = originalRowID

but sqlce don't accept two query for the same commandtext.. and the
re-query cannot be possible.
 
E

Earl

Thanks Kevin. As I noted to Antonio, I didn't think it was possible, but
was hopeful. I'll check out your link.
 
K

Kevin Yu [MSFT]

Hi Earl,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top