Disconnected Recordset: Not editable SQL-JOIN used 
Author Message
 Disconnected Recordset: Not editable SQL-JOIN used

Hello

I figured out that I can not Update/Insert anything a my unbound/disconected
recordset when the Recordset has created with more then one Table

"Select A,B,C FROM Table1, Table2 WHERE A = C"  -<--update/insert doesnt
work even it is disconected

"Select A FROM Table 1 " <---update/insert works...

My question: How can I make update/inserts into a table where I use
"SQL-WHERE" (1st Query)

thanks

Miki ;>



Sat, 06 Jul 2002 03:00:00 GMT  
 Disconnected Recordset: Not editable SQL-JOIN used
Hi,

Generally speaking, to be updateable, a recordset from two tables requires
that the tables have a 1-many relationship.

Aloha,

Doug


Quote:
> Hello

> I figured out that I can not Update/Insert anything a my
unbound/disconected
> recordset when the Recordset has created with more then one Table

> "Select A,B,C FROM Table1, Table2 WHERE A = C"  -<--update/insert doesnt
> work even it is disconected

> "Select A FROM Table 1 " <---update/insert works...

> My question: How can I make update/inserts into a table where I use
> "SQL-WHERE" (1st Query)

> thanks

> Miki ;>



Sat, 06 Jul 2002 03:00:00 GMT  
 Disconnected Recordset: Not editable SQL-JOIN used
This is not an ADO issue.  The select/where statement is used by the DB
SYSTEM to determine whether the view is 'updatable' or not.  This is true
whether we use an API LIB (like DBLIB for sql server) or ADO or whatever.
Please review your server documentation on this topic.  Factors which affect
this are such things as computed columns, primary keys, uniqueness of
columns, referential constraints.  In general, TEST for updatablity using a
SERVER tool (like ISQL/W) and simulate the statements which you want ADO to
use. Then code in ADO.  ADO is not magic, nor does it have a mind of its
own.  The Server (Oracle, SQL Server, DB2, whomever) has the ultimate say in
these things.

hope this helps.

[also please reduce the number of crossposts and try to stay on topic to
those you post to]


Quote:
> Hello

> I figured out that I can not Update/Insert anything a my
unbound/disconected
> recordset when the Recordset has created with more then one Table

> "Select A,B,C FROM Table1, Table2 WHERE A = C"  -<--update/insert doesnt
> work even it is disconected

> "Select A FROM Table 1 " <---update/insert works...

> My question: How can I make update/inserts into a table where I use
> "SQL-WHERE" (1st Query)

> thanks

> Miki ;>



Sat, 06 Jul 2002 03:00:00 GMT  
 Disconnected Recordset: Not editable SQL-JOIN used
Hi,

Depend on the Provider, not ADO itself (which is just supposed to be a thick
layer of communication inserted between your program and the engine). With
JET, no. Try:

SELECT Table1.A, Table1.B, Table2.C
FROM Table1 INNER JOIN Table2 ON Table1.A=Table2.C

(assuming the Table1.A, Table1.B, Table2.C describe the right table origin
for the fields).

In this case, JET marks as not-updateable a relation expressed between two
tables in the WHERE clause. Generally, the solution is to bring the criteria
inside the JOIN syntax, in the ON clause (instead of the WHERE). That
statement does not necessary hold for DELETE  query.

Hoping it may help,
Vanderghast, Access MVP.


Quote:
> Hello

> I figured out that I can not Update/Insert anything a my
unbound/disconected
> recordset when the Recordset has created with more then one Table

> "Select A,B,C FROM Table1, Table2 WHERE A = C"  -<--update/insert doesnt
> work even it is disconected

> "Select A FROM Table 1 " <---update/insert works...

> My question: How can I make update/inserts into a table where I use
> "SQL-WHERE" (1st Query)

> thanks

> Miki ;>



Sat, 06 Jul 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Disconnected Recordset: Not editable SQL-JOIN used

2. Disconnected Recordset: Not editable SQL-JOIN used

3. Join together disconnected recordsets with SQL statement

4. SQL Server JOINed recordsets not updatable?

5. Udate SQL server using disconnected recordsets

6. Udate SQL server using disconnected recordsets

7. Using ado recordset in an SQL Server inner join

8. Disconnected recordsets deleting data from joined tables

9. join between 2 disconnected recordsets

10. Can not find SQL Server (I'm not using SQL Server)

11. True DbGrid - multiple, Editable JOINS ?

12. Run SQL Statement Against Disconnected ADO Recordset

 

 
Powered by phpBB® Forum Software