Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Update. Database or Object Is Read-only

Status
Not open for further replies.

Schweiger

Programmer
Apr 26, 2002
122
CH
hi

I've come to a problem with the following scenario:
VB 6.0 SP 5
ADO (Microsoft ActiveX Data Objects 2.5 Library)
MDAC 2.6
I would like to show data in a grid and to update this data. The data is the result of a left join from 2 tables.
It's no problem to do so as long as I use Cursorlocation = ClientSide. But I would like to use ServerSide. After a very long time of trying I've figured out that I can update my recordset as long as I don't use DISTINCT in my SQL-Statement.
My question is, is there a possibility to have the same effect as distinct has without loosing the ability to update the recordset. I've tryed GROUP BY but it doesn't work either.

Any help would be appreciated
Schweiger
 

If you use Select Distinct ... in your query, you are in effect, culling out any duplicate records that match the selected columns. There is not be enough information to identify a single record for updating since it is not known if a duplicate was removed from the returned recordset (the duplicates).




Mark
 
Simple things are often complicated... I would take the table and update all rows which are equal. this way I've got to create a recordset, change the values, update the tables with an updatequery and then to cancel the changes in the recordset and to requery it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top