IsBinding set to false after EndEdit()
- From: "Larry Huisingh" <lhuisingh at netscape dot net>
- Date: Fri, 29 Apr 2005 11:29:15 -0700
I am writing a hopefully very simple database application that uses SQL
Server and VB.NET. My question centers around a form I have created that
gets data from the database and puts a record's worth of data into a
dataset. I can retrieve data from the database and the form displays it
just fine. I have run into a problem when I have tried to edit the contents
of a single row in the dataset. When I start editing I issue a BeginEdit()
call
DsViewReq1.Tables("workreq").Rows(0).BeginEdit()
When I am done and want to cancel the changes to the dataset I use the
CancelEdit() method
DsViewReq1.Tables("workreq").Rows(0).CancelEdit()
When this line (CancelEdit) is executed the form textbox control
"editrequest" retains the original value of that control as intended.
However, when I want to save the changes to the dataset row I use the
EndEdit() method.
DsViewReq1.Tables("workreq").Rows(0).EndEdit()
When this line is executed the "editrequest" control is reset to an empty
string. The IsBinding read-only property is set to false.
CancelEdit leaves IsBinding() as true while EndEdit sets it to true. Am I
missing some concept here on how to keep the bindings active and how to edit
datasets?
Ultimately the dataset will be sent to the SQL database table via the data
adapter's Update method.
I am trying to use the Windows Forms wizards for data adapters, record sets,
etc., for what that's worth. The only books I have seem to assume the
programmer is not using the wizards and is doing all the coding by hand.
Where do I go from here? Any good book suggestions?
Thanks in advance.
Larry Huisingh
.
- Prev by Date: ADO Query Error 'Path not found'
- Next by Date: Error in Upload and download binary (zip) files to Oracle Blob
- Previous by thread: ADO Query Error 'Path not found'
- Next by thread: Error in Upload and download binary (zip) files to Oracle Blob
- Index(es):
Relevant Pages
|