?
Solved

ERROR UPDATING ADOGRID TEXTFIELDS

Posted on 2004-08-31
4
Medium Priority
?
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

771 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