•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 370,597 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,026 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 5219 | Replies: 3
![]() |
•
•
Join Date: Aug 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
I cant call :
[111.111.111.1].Database.dbo.fn_test(@test) (Not working !)
but i can call :
Database.dbo.fn_test(@test)
why ?
and if no way to call this, can i populate in a function
a TABLE variable using a Stored Procedure to do this ?
CREATE FUNCTION fn_test(@idcode int,@idoper int)
RETURNS TABLE
AS
RETURN (EXEC [111.111.111.1].Database.dbo.sp_populate)
Not working !
Thanks for your help
[111.111.111.1].Database.dbo.fn_test(@test) (Not working !)
but i can call :
Database.dbo.fn_test(@test)
why ?
and if no way to call this, can i populate in a function
a TABLE variable using a Stored Procedure to do this ?
CREATE FUNCTION fn_test(@idcode int,@idoper int)
RETURNS TABLE
AS
RETURN (EXEC [111.111.111.1].Database.dbo.sp_populate)
Not working !
Thanks for your help
•
•
Join Date: Sep 2006
Posts: 26
Reputation:
Rep Power: 2
Solved Threads: 1
hey buddy,:lol:
first you need to add up the linked server
EXEC sp_addlinkedserver
@server = 'server1',
@srvproduct = '',
@provider = 'sqloledb',
@datasrc = 'LocalServer'
then
add linkedserverlogin
EXEC sp_addlinkedsrvlogin 'server1', 'true'
then write up the query as
[server1].Database.dbo.fn_test(@test).
reply me if u need further info.
Thanks,
Chaitanya.
first you need to add up the linked server
EXEC sp_addlinkedserver
@server = 'server1',
@srvproduct = '',
@provider = 'sqloledb',
@datasrc = 'LocalServer'
then
add linkedserverlogin
EXEC sp_addlinkedsrvlogin 'server1', 'true'
then write up the query as
[server1].Database.dbo.fn_test(@test).
reply me if u need further info.
Thanks,
Chaitanya.
•
•
Join Date: May 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
I'm having a similar issue. I've defined the linked server and I can select from the remote tables, but I get an "invalid column name" error on the linked server name when I perform a function call from the linked server. Both servers are Enterprise Edition (64-bit) with build # 9.00.3042.00 (SP2). Any ideas? Thanks in advance... Dale
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
- User-defined functions (C++)
- User-Defined Function - part 2 (C++)
- How can I create a user defined function (MS SQL)
- error in user defined string class (C++)
- using(STL)function object (bind2nd) with a user defined function object (C++)
Other Threads in the MS SQL Forum
- Previous Thread: database hosting......
- Next Thread: Exporting to Excel from SQL Server DB


Linear Mode