Solved

ERROR UPDATING ADOGRID TEXTFIELDS

Posted on 2004-08-31
4
221 Views
Last Modified: 2008-02-26
I open a Database, wich is connexted to a ADOrecordset,
on mainform  some fields  e.g.  Name, Street, City, Phone, Fax
when I 'click/walk" through  grid displaying on mainform works fine
because thes field have datasource as ADObrookers, Datafield  'their table name'
BUT: as soon as I start changing (to save later), or even typing in e.g. streetaddress
I get this error
----------------------------------------------------------------------------------------
>Binding Collection Error
>Field not updatable, Bound Property Name: Text, Field Name: BrokerStreet
----------------------------------------------------------------------------------------

This is how we open.
 Sql = "SELECT * from Brookers order by brokernum"
 rsBrokers.CursorLocation = adUseServer
 rsBrokers.CursorType = adOpenKeyset
 rsBrokers.LockType = adLockOptimistic
 rsBrokers.Open "brookers", "provider=PervasiveOLEDB;Data source=Newindia", adOpenDynamic,  adLockOptimistic, adCmdTable
 adoBrookers.CommandType = adCmdText
 adoBrookers.RecordSource = Sql
 adoBrookers.Refresh
 rsBrokers.MoveFirst

BUT:
If I open like this, no error

 Sql = "SELECT * from Brookers order by brokernum"
 rsBrokers.CursorLocation = adUseServer
 rsBrokers.CursorType = adOpenKeyset
 rsBrokers.LockType = adLockOptimistic
 rsBrokers.Open "brookers", "provider=PervasiveOLEDB;Data source=Newindia", adOpenDynamic,  adLockOptimistic, adCmdTable
 rem skip               adoBrookers.CommandType = adCmdText
 rem skip                adoBrookers.RecordSource = Sql
 rem skip                adoBrookers.Refresh
 rsBrokers.MoveFirst

I prefer to open the first way , because then I have the option
to change Sql  setting, and can call the adoBrookers.Refresh after e.g.  deleting record

So what do I wrong?
Regards Jack


0
Comment
Question by:BIAPRO
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:rsriprac
ID: 11941348


Try:

 Sql = "SELECT * from Brookers order by brokernum"
 rsBrokers.CursorLocation = adUseClient
 rsBrokers.CursorType = adOpenStatic
 rsBrokers.LockType = adLockOptimistic
 rsBrokers.Open "brookers", "provider=PervasiveOLEDB;Data source=Newindia", adOpenDynamic,  adLockOptimistic, adCmdTable
 adoBrookers.CommandType = adCmdText
 adoBrookers.RecordSource = Sql
 adoBrookers.Refresh
 rsBrokers.MoveFirst
0
 

Author Comment

by:BIAPRO
ID: 11941757
Sorry,

----------------------------------------------------------------------------------------
>Binding Collection Error
>Field not updatable, Bound Property Name: Text, Field Name: BrokerStreet
----------------------------------------------------------------------------------------
Same error the moment I type in a field.
Jack
0
 
LVL 5

Accepted Solution

by:
rsriprac earned 250 total points
ID: 11941921
Maybe this posting will help you out:

http://0url.com/ov9

-Ram
0
 

Author Comment

by:BIAPRO
ID: 11952343
I was not able to solve this, I rewrote sub,  by setting up separate variables for fields,
then unbound these fields from ado, then call a sub to set values from separate variables to the adorecordset, then close ado, reopen, reshow grid.
Thanks anyway, Jack
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an explanation of a simple data model to help parse a JSON feed
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now