I had a stored function created in SQL Server. When I try to call that from vb.net with command text like…
---- Returning error
lobjCommand.CommandText="Select function_name(value1)"
----- Executing properly without errors
lobjCommand.CommandText="Select dbo.function_name(value1)"
Can someone suggest what exactly the dbo playing the magic…
Thanks in advance
Rupesh
dbois most likely your default schema. It stands for Database Owner.When running functions in your SQL queries you need to specify the schema that the function belongs to.
If you don’t then there could be two different functions with the name
function_namebelong to two different schemas. Without mentioning the schema, the server won’t know which function you are calling.