Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Linked servers:Sql Server and Ingres

Author  Topic 

nati_nieves
Starting Member

4 Posts

Posted - 2002-05-02 : 09:25:01
Hi

In the Ingres databases, when you want to update a field of a table, for example:

update tableX
set filed1 = 1
where field2 = 3

you can finish with the coomit instruction:

update tableX
set filed1 = 1
where field2 = 3
;commit

The problem is that I have a linked server (the name is prueba) from a server that it has a database in Sql Server to other server that it has other database in Ingres and I wan´t to do this:

update openquery(prueba, 'select * from centro')
set campo1 = 1
where campo2 = 3

But how can I do simulate the commit, because when I do the next:

update openquery(prueba, 'select * from centro;commit')
set campo1 = 1
where campo2 = 3

the analyzar of Sql Server gives me the next error:

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [CA][OpenIngres ODBC Driver][OpenIngres]line 1, Syntax error on ';'. The correct syntax is:
PREPARE stmnt_name [INTO name] FROM statement_text]

and I don`t want to do a prepare instruction. Is ther somebody that can help me????

Thank you very much.

   

- Advertisement -