jack niekerk
asked on
ERROR UPDATING ADOGRID TEXTFIELDS
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;D ata 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;D ata 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
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;D
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;D
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
ASKER
Sorry,
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- --
>Binding Collection Error
>Field not updatable, Bound Property Name: Text, Field Name: BrokerStreet
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- --
Same error the moment I type in a field.
Jack
--------------------------
>Binding Collection Error
>Field not updatable, Bound Property Name: Text, Field Name: BrokerStreet
--------------------------
Same error the moment I type in a field.
Jack
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
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
Try:
Sql = "SELECT * from Brookers order by brokernum"
rsBrokers.CursorLocation = adUseClient
rsBrokers.CursorType = adOpenStatic
rsBrokers.LockType = adLockOptimistic
rsBrokers.Open "brookers", "provider=PervasiveOLEDB;D
adoBrookers.CommandType = adCmdText
adoBrookers.RecordSource = Sql
adoBrookers.Refresh
rsBrokers.MoveFirst