SQLCE

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

How can I get the result of a SELECT sqlce command and
know if one or zero rows affected?
 
I think you have a few choices.

Use a Dataset and then ds.Tables["table"].Rows.Count will
have the count.

Execute the same sql command but with select count(column)
first.
 
Look up the SqlCeDataReader class in the help. There is an example in
the About. Basically, your SqlCeCommand select query will return an
SqlCeDataReader object which you will use to iterate through affected
rows. If Zero rows are affected, the read() function returns false
immediately.

Joe Zhang
 

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

Back
Top