Solved

ERROR UPDATING ADOGRID TEXTFIELDS

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb wildfly example 2 72
ASP/VB email question 4 62
ejb entity bean example 2 35
Select specific duplicate row based on specific criteria 4 70
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

756 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