Using RDO to do SQL updates on SQL Server 6.0 
Author Message
 Using RDO to do SQL updates on SQL Server 6.0

Hello,

We are working on a project in which we need to establish a
connection with a remote SQL 6.0 DB using VB 4.0.  We were told
that the new RDO and RDC functions that ship with the
Enterprise edition could do wonders for us, but we have yet to
reap the benefits of RDO.

In specific we are having MAJOR problems updating a resultset
accross multiple tables.  We have tried several methods (both
RDO methods and the RDC) and everything we have tried has
failed.  Most recently we have created a simple form with one
command button on it that has the following code.

Dim en As rdoEnvironment
Dim cn As rdoConnection
Dim rs As rdoResultset
Dim sConn As String
Dim sSQL As String

sConn = "DSN=*******;UID=*****;PWD=***;DATABASE=******;"

Set en = rdoEnvironments(0)
Set cn = en.OpenConnection("", rdDriverPrompt, False, sConn)

'Take the line extension _ out of the select statement
Set rs = cn.OpenResultset(Name:= _
        "SELECT C.CompanionMediaPartIdentifier,
C.TitleIdentifier,                 C.MediaOrPartName,
T.TitleIdentifier, T.TitleName _
        FROM CompanionMediaOrPart C, Title T _
        WHERE C.TitleIdentifier = T.TitleIdentifier", _
        Type:=rdOpenKeyset, LockType:=rdConcurRowver,
Option:=0)
rs.Edit

'Update the Component Name and Title name in the
CompanionMediaOrPart and Title tables respectively.
rs.rdoColumns(2).Value = "RDOTestJoin1"
rs.rdoColumns(4).Value = "RDOTestJoin2"

'Do the updates
rs.Update
'Craps out here
'
'
'
This code will produce the following error:
"S0022 [Microsoft][ODBC SQL Server Driver][SQL Server] Invalid
Columnn name 'Titlename'"

Also note that if we use DAO and JET(using a jet sql statement
with inner join rather that Transact SQL's where clause) the
updates WORK!!!

This is our sad story.  Please advise us on how we can make
this work.  Or if it is possible at ALL!!!

Please Help

Mike Porter



Sat, 23 May 1998 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. 2nd SQL Server update after update text field corrupts row - using RDO

2. doing updating from grid to sql server with stored procedure sql 2000

3. VB4 RDO Won't detect an error in an SQL Server 6.0 stored procedure

4. VB4 RDO Performance: SQL Server 6.0 vs 6.5

5. Need help for RDO with MS SQL Server 6.0

6. flaky behavior with RDO and SQL server 6.0

7. SQL Server 6.0 and RDO with PPP or other Internet access

8. flaky behavior with RDO and SQL server 6.0

9. HELP: VB4 rdo & SQL Server 6.0

10. Error doing update with VB 3.0 and SQL Server 6.5

11. SQL Server Update with RDO

12. RDO, SQL Server and error on Update

 

 
Powered by phpBB® Forum Software