Dataset Question

  • Thread starter Thread starter Arsalan
  • Start date Start date
A

Arsalan

Suppose I have two textbox bound to a dataset having two fields [employee_id
& salary]

What should i put in the validation event of textbox to check if the is
unique or not ? it seems that until & unless dataset is updated, the
database doesnt reflect the changes, so how do i search in the existing
dataset?
 
Arsalan.

In Outlook Express will a message with a simple name be connected to another
message. So make your questions more meaningfull to let them not set at an
other message in that.

When you want to check on existisy in the database. (I don't know if your
dataset reflects all the numbers) than you can use the
sqlclient.command.executescalar to see if it exist. Be aware that in the
same time another user can make that id in your datatable. An
uniqueidentifier can be a better choise, where the Guid is than a very
simple and good identifier to use.

http://msdn.microsoft.com/library/d...qlclientsqlcommandclassexecutescalartopic.asp


I hope this helps?

Cor
 

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