SQL Server - Specifying Database Name/Owner Name when using prepareCall statement

From: Ryan (rkennel_at_veng.com)
Date: 08/25/04


Date: 25 Aug 2004 12:17:39 -0700

When calling a stored procedure in sql server passing just the Stored
Procedure name, my stored procedure name works correctly. Below is
the String I use when performing Connection.prepareCall(String)

        {CALL sp_name (?,?,?)}

However when I want to specify the db name and the user name (name of
the user who owns the sp), I get an error that the driver could not
find the stored procedure. Any clues as to how this could be fixed?
In other words, how can I set the default database name and owner name
to query against?

        {CALL dbName.username.sp_name (?,?,?)}



Relevant Pages

  • RE: SQL stored procedure executing twice
    ... from one parent record to another. ... Dim stDocName As String ... My pass-thru query syntax going to stored procedure ...
    (microsoft.public.access.modulesdaovba)
  • RE: MS Query "Connections"
    ... handle that with my connection string. ... for using the stored procedure route is that it is faster. ... If you truly want to pass in the query string, ...
    (microsoft.public.excel.programming)
  • Re: XML binding advice
    ... Performance - By writing the SQL statement as a stored procedure, ... execution plan will take into account any indexes you have on the tables ... each piece you add to the string. ...
    (microsoft.public.dotnet.xml)
  • Re: TableAdapter specifing IN in the where clause for list of id
    ... And till now, there products which are huge products, they are using AD-HOC ... Since IN cannot accept a delimited string but ... Muhammad replied that I could use a stored procedure to accomplish this ... specify. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Creating A Custom Collection
    ... You'll have to get away from using multidimensional arrays. ... > string StoredProcedureName, string UserName, string TransactionType ... > stored procedure so it can walk this object to create a SqlCommand ... > send the name of the proc and the parameters object to the data layer ...
    (microsoft.public.dotnet.framework)