(Type your message here)
Hi,
I'm having a problem with binding a textbox to a dataset. Cananybody figure out what's going on here?
I simply want to update a record. Type in a permit number andsave it to the database. I get the "cannot bind to columnpermitnum ber on datasource" error, or if I add the tablename.colum n name into the binding, a permit number that alreadyexists pops up.
Here is my code:
Dim dbConn As NewOleDbConnect ion("Provider=M icrosoft.Jet.OL EDB.4.0;DataSou rce=C:\Projects \Tests\ParkingP Ermits.mdb")
Dim da As New OleDbDataAdapte r("select * from permits",dbConn )
Dim cb As New OleDbCommandBui lder(da)
Dim ds As New DataSet
da.UpdateComman d = cb.GetUpdateCom mand
da.DeleteComman d = cb.GetDeleteCom mand
da.InsertComman d = cb.GetInsertCom mand
da.Fill(ds, "permits")
txtPermits.Data Bindings.Clear( )
txtPermits.Data Bindings.Add("t ext", ds,"permits.per mitnumber")
da.Update(ds, "permits")
Do I have something in incorrect order?
Thanks,
--------------------------------
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>ibX1YBnxQEy TvHkI3D9avw==</Id>