# Miscellaneous > Database Programming >  5701 Changed database context to... using SQL 7 Stored Proc's

## Neal Walters

I&#39;m trying to use SQL 7 stored procedures to implement something like 
example B7 where I allow users to signon and only show them to update
records that they should be able to update. 

I first got the error in my B7 code, then I simplified down 
to a hardcoded simple ASP that tries to do a view (without 
all the logon stuff). 

ASP code set if SQL statement: 
  mydb.SQL = &#34;EXEC training_usp1 @parm1=abc&#34; 
I also have: 
  MyDB.dbDBType = &#34;SQL&#34; 


Listing of Stored Procedure: 

CREATE PROCEDURE training_usp1 
@parm1 char(12) = NULL 
AS
SELECT tr_exam, tr_classname, tr_city, tr_metroplex, tr_state, 
    tr_country, tr_date_from, tr_date_to, tr_cost, trp_comp_name, 
    tr_teacher
from training, trprovider 
where tr_provider_id = trp_id 
          and trp_userid = @parm1




I&#39;m getting the following error: 
Error # = 0
Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to &#39;abcdefg&#39;.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 01000
NativeError = 5701

NOTE: &#34;abcdefg&#34; is my userid and database name. 

followed by

Error # = 0
Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 01000
NativeError = 5703

Any ideas? 
Thanks in advance, 
Neal Walters
http://ITCoolStuff.com

----------


## Frank

use the stored procedures properties when dealing with SPs and not dbSQL.

dbStoredProc
dbStoredProcCmdParams



FK



------------
Neal Walters at 2/28/00 12:40:33 AM


I&#39;m trying to use SQL 7 stored procedures to implement something like 
example B7 where I allow users to signon and only show them to update
records that they should be able to update. 

I first got the error in my B7 code, then I simplified down 
to a hardcoded simple ASP that tries to do a view (without 
all the logon stuff). 

ASP code set if SQL statement: 
  mydb.SQL = &#34;EXEC training_usp1 @parm1=abc&#34; 
I also have: 
  MyDB.dbDBType = &#34;SQL&#34; 


Listing of Stored Procedure: 

CREATE PROCEDURE training_usp1 
@parm1 char(12) = NULL 
AS
SELECT tr_exam, tr_classname, tr_city, tr_metroplex, tr_state, 
    tr_country, tr_date_from, tr_date_to, tr_cost, trp_comp_name, 
    tr_teacher
from training, trprovider 
where tr_provider_id = trp_id 
          and trp_userid = @parm1




I&#39;m getting the following error: 
Error # = 0
Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Changed database context to &#39;abcdefg&#39;.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 01000
NativeError = 5701

NOTE: &#34;abcdefg&#34; is my userid and database name. 

followed by

Error # = 0
Description = [Microsoft][ODBC SQL Server Driver][SQL Server]Changed language setting to us_english.
Source = Microsoft OLE DB Provider for ODBC Drivers
SQL State = 01000
NativeError = 5703

Any ideas? 
Thanks in advance, 
Neal Walters
http://ITCoolStuff.com

----------


## Neal Walters

Found this description in online help for MS/SQL. 
It says the error is informational only, so why does ASPDB choke on it? 

Thanks,
Neal Walters
http://ITCoolStuff.com

-------------------------------

Error 5701
Severity Level 10
Message Text
Changed database context to &#39;%.*ls&#39;.

Explanation
This is an informational message indicating that the database context has changed. This message is returned anytime a USE database statement is executed.

Action
None needed.

See Also

----------

