Solved

ERROR UPDATING ADOGRID TEXTFIELDS

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
userCompare  challenge 3 62
commonTwo  challenge 63 101
tidtcpserver connection lost handle 2 49
Path to Python 9 48
I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
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 …
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 …

746 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

10 Experts available now in Live!

Get 1:1 Help Now