Reading Identity from Linked Server

Reading Identity from Linked Server

Post by test » Thu, 04 Jul 2002 03:47:30



We can't get a linked server to return the identity row on an insert.

Can anyone help

SQL is like

set nocount on
insert into xyz ( a, b, c ) values ( 1, 2, 3 )

this works fine when connected directly to the primary server, but returns a
null when using a linked server.

 
 
 

Reading Identity from Linked Server

Post by Anith Se » Thu, 04 Jul 2002 05:57:04


From Books Online


on which it is executed. This function cannot be applied
to remote or linked servers. To obtain an identity value
on a different server, execute a stored procedure on that
remote or linked server and have that stored procedure,
which is executing in the context of the remote or linked
server, gather the identity value and return it to the
calling connection on the local server.

- Anith


> We can't get a linked server to return the identity row on an insert.

> Can anyone help

> SQL is like

> set nocount on
> insert into xyz ( a, b, c ) values ( 1, 2, 3 )

> this works fine when connected directly to the primary server, but returns
a
> null when using a linked server.


 
 
 

1. SQL Server - Unable to read IDENTITY property of a column

Platform: VC 6.0, NT4.0, ADOX,ADO
Database: SQL Server 2000, Microsoft Access 2000

Hi,
I am using SQL Server as back end into my application. I am using ADOX to
read properties of   a column. I can read Column Name, Type, Length etc. but
I am not able to   IDENTY or AutoIncrement property.

May I know how can I resolve such problem?
Is there any way to read IDENTITY property using T-SQL?

Thanks in advance.
Vijay

2. Need help with Triggers, Problems with cascade deletes

3. How to read @@IDENTITY from Sql Server through ADO

4. SQL admin jobs

5. SQL Server - Unable to read IDENTITY property of a column

6. How to measure Database performance ?

7. @@IDENTITY from a link server

8. Position Open

9. linked server and @@identity

10. linked server + autonumber (identity)

11. @@IDENTITY on linked server

12. @@IDENTITY from a link server

13. Linked Server Error on table with identity column