Click here to Skip to main content
16,012,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am calling a function in my database with dbo.function_name. it is working fine at local server but when i created it on server it is throwing error but working like databasename.function_name.

but i want a solution because if i change from dbo to server name i have to change it in my whole database please help me

thanks in advance
Posted

1 solution

Looks like you have created the function in a different database that you're using. You can:
- create the function in the same database you use
- change the connection to the database where the function is
- use three part notation: database.owner.object

Dbo isn't the server name, it's the owner of the object. You never define the server name in your query, it's part of the connection string.

If the object is owned by another user than dbo you should define the owner.

So even if you change the server name (SQL Server instance) the SQL statements won't be interfered.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900