IsBinding set to false after EndEdit()



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").R­ows(0).BeginEdit()

When I am done and want to cancel the changes to the dataset I use the
CancelEdit() method

DsViewReq1.Tables("workreq").R­ows(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").R­ows(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


.



Relevant Pages

  • Re: MSI unable to start the SQL instance service
    ... the cluster service. ... Senior Database Administrator ... Microsoft SQL Server MVP ... one node at a time and then only under the control and direction of the ...
    (microsoft.public.sqlserver.clustering)
  • Re: SQL 2005 express security issue
    ... At a remote location where you do not control the rights granted on the server, there is nothing you can do about this. ... If your application and the remote user log in with accounts that are not sysadmins then you can protect databases, tables, stored procedures, etc. ... However, within a database there are other roles that, if granted, give sweeping rights. ... We just revamp our application from Access to use SQL Express 2005 as database engine, which is a standalone application running on client PC. ...
    (microsoft.public.sqlserver.security)
  • Re: SQL Injection with JDBC
    ... DATABASE, where it belongs. ... if you don't know you should not be replying, but for you, "Sql injection" ... it brings central control to the data repository. ... indeed does not the example code use a prepared statement? ...
    (comp.lang.java.programmer)
  • Re: Need Expert Help and Advice. Thank You.
    ... Which data type should I use in the SQL 2005 database ... For example, an integer, a control definition, a class, etc. ... For example data type, etc. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: CREATE AGGREGATE failed because type Concatenate does not conform to UDAGG specification due to
    ... Go to the Database tab and click on the browse button next to the connection string. ... In the New Database Reference dialog, enter the details for the database where you want to deploy the assembly and create the user defined aggregate. ... I'm trying to do some CLR integration with sql server 2005. ...
    (microsoft.public.sqlserver.programming)

Quantcast