Re: Extended Stored Procedure: Get the current db of the client



This never worked correctly, this is not way you can get the database
context from within an XP, easiest work around is to use a wrapper SP that
passes the db_name() or db_id() as a parameter.

In general using wrapper SP's is a good practice for doing parameter
validation, and meta data exposure since XP's do not emit the parameter
signatures.

GertD@xxxxxxxxxx


"Sue Hoegemeier" <Sue_H@xxxxxxxxxxxxx> wrote in message
news:feuv521gpm893g6hfi4aja0vpp8vguiun4@xxxxxxxxxx
What version of SQL Server?
It's a limitation of extended stored procedure programming
with SQL Server 2000. Some have tried using svr_rpcdb but it
will generally just return master as the database name. And
it's no longer supported.

-Sue

On Mon, 8 May 2006 14:41:59 +0200, "Hans Stoessel"
<hstoessel.list@xxxxxxxxxxxx> wrote:

Hi

Is there a way to get the current database of the client who calls my
Extended Stored Procedure?

I have written a DLL in Visual Studion 2005 for the SQL server 2003 in
C/C++
using the functions srv_*.

Thanks.
Hans




.



Relevant Pages

  • Re: What do I get for all this compexity??
    ... volumes of data (aka a database) and handle many users at the same time -- ... only logical way for MS to proceed with a development platform. ... "just a wrapper around existing code with some tweaks added," you might as ... some form of data to a datagrid. ...
    (microsoft.public.dotnet.general)
  • emulating DBI over Rosetta
    ... A couple months ago I announced that I was going to experiment with cross-cpan refactoring where I would update a variety of DBI wrappers to use my SQL::Routine module internally. ... Instead, I will be going ahead with a plan I had much earlier on which is to make a new Pure Perl module that is a wrapper for Rosetta that emulates DBI, probably to be named Rosetta::Emulator::DBI. ... What will happen behind the scenes with your database instructions that didn't happen before is that their SQL strings will be completely parsed into a SQL::Routine model and then re-assembled into new SQL strings which are actually executed, assuming your actual database engine is unchanged. ...
    (perl.dbi.users)
  • Re: Retreiving the owner of a File
    ... with wrapper upon wrapper of bloated and slow sub-systems. ... How fast do you think it would run with Linux on the same hardware? ... If you're file permissions are so complex you need a database, it probably means you're doing something wrong and anyway, this database would not be updated in real time. ...
    (microsoft.public.vsnet.general)
  • Re: [PHP] 2 Questions.
    ... My second question is I've designed a very simple Postgres database wrapper. ... The reason I ask is when designing my tables I'm delegated ... generate in PHP. ...
    (php.general)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... Put the same "wrapper" stored procedure in every ... This causes the SP to run under the context of the database it was ... It's a limitation of extended stored procedure programming ... with SQL Server 2000. ...
    (microsoft.public.sqlserver.odbc)