Solved

ERROR UPDATING ADOGRID TEXTFIELDS

Posted on 2004-08-31
4
222 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

ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
firstChar challenge 13 115
wordmultiple challenge 12 136
How  do I get an older program to run in Windows 10? 20 111
Query Syntax 17 36
A short article about problems I had with the new location API and permissions in Marshmallow
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

831 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