why can't I drag odbc table onto gridView (datagrid) and UPDATE

Posts   
 
    
yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 23-Sep-2005 12:56:55   

hiya,

I know this is a bit OT, but I didn't see a relevant forum in the "drivers" section. Anyway,

in asp.net 2.0 --> server explorer, I drag a table from an odbc database and bind to a gridView (datagrid).

OK, so far.However, due to the technology I am using, I have to use RDO for any updates.Therefore, I have to:

1) retrieve an rdoRecordset from the same database table 2) update the results and send back to database

So, in effect, I have to retrieve the data twice.That is not the problem, the problem is:

asp.net sets the underlying rdo recordset to "readOnly" if it is bound to the datagrid in this way.

YET, the underlying rdo recordset is successfully set to readWrite IF I:

1) create an odbcDatareader 2) populate a datatable with this dataReader 3) bind the gridView to the datatable

Does anyone know why asp.net somehow sets the records to "readOnly" if I drag them from the serverExplorer and databind?Is there an easier way for me to bind to the gridView, yet still be able to UPDATE the underlying RDO recordset

I assure you that it is all happening on a local machine, so there should be no concurrency issues.

many thanks, yogi

(Frans, if there is a more relevant slot in the database drivers section, maybe it should go there, but I wasn't sure if it was too OT )

Paul.Lewis
User
Posts: 147
Joined: 22-Aug-2005
# Posted on: 24-Sep-2005 04:38:23   

Yogi,

Thankfully, it's been a long time since I used RDO. I seem to remember ForwardOnly/ReadOnly cursors, and several other optional cursor types related to RDO. Perhaps your issue isn't with the datagrid, but with the recordset property settings?

Paul

yogiberr
User
Posts: 432
Joined: 29-Jun-2005
# Posted on: 24-Sep-2005 16:01:34   

hiya, good point. I'll rephrase the question.

what happens to the underlying records when you drag an odbc table from serverview and bind to a datagrid..what soirt of "lock" is added to the records?

many thanks, yogi