Solved

VB6/SQL getting "Changed language setting to us_english" with one procedure

Posted on 2014-04-28
6
1,285 Views
Last Modified: 2014-05-21
Hi.  
In an old VB6 application, I added a call to a new INSERT stored procedure that I created, for a table I also created.  I copied the formats from an existing one that works (and you can see them, attached as .sql files)

When VB6 executes the call to the proc, it returns two VB6 errors:  
VB6 error 5703, which shows as:
Error 01000: [Microsoft][SQL Server Native Client 10.0][SQL Server] Changed language setting to us_english.

Open in new window

VB6 error 5701:
Error 01000: [Microsoft][SQL Server Native Client 10.0][SQL Server]Changed database context to 'ProdDB'.

Open in new window

(I know that they are really not "errors" in SQL, but the existing VB6 code sees them as such.)

Even though I get this error back from my new procedure only, I have checked my user language settings, which point to English (picture attached).

Why would I get this behavior on only this one procedure?
I can post more source code if you want to see it.

Thanks!

LoginCREATE-TABLE.sql
CREATE-PROC.sql
0
Comment
Question by:Rob Rudloff
  • 2
  • 2
  • 2
6 Comments
 
LVL 12

Expert Comment

by:jkaios
ID: 40028396
try inserting the keyword "USE [database]" at the very top of each SQL script as follows:

   USE ProdDB

   Create procedure...
0
 
LVL 12

Assisted Solution

by:jkaios
jkaios earned 250 total points
ID: 40028406
...oh and according to some MSDN blog:

Applications can simply ignore these 5701 and 5703 messages, they are purely informational.

http://blogs.msdn.com/b/developingfordynamicsgp/archive/2009/08/12/what-are-errors-5701-and-5703-that-show-in-the-dexsql-log.aspx
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
ID: 40029342
I know that they are really not "errors" in SQL, but the existing VB6 code sees them as such.
Could you elaborate by posting your code so that we can see how VB6 sees those errors.

]Unrelated to your question, but the Transaction is not needed and you may be better off using SET NOCOUNT ON at the top of your Stored Procedure.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Accepted Solution

by:
Rob Rudloff earned 0 total points
ID: 40032740
Anthony Perkins --
SO, the "BEGIN / SAVE / COMMIT TRANSACTION" stuff is not needed?  (I've just been copying really old procedures from that DB as a template for new ones)

Jkaios --
I can't "USE ProdDB" at the top, because the procedures actually exist in two different databases with two different names, one "restored" from the other.  Then an ODBC connection points to a database selected by the user.

But -- I found the problem ...

In the Insert procedure, the line returning the identity was:
     SELECT CCARD_TRANS_ID = @@IDENTITY
but should be:
     SELECT @CCARD_TRANS_ID = @@IDENTITY

Strangely enough, fixing that makes it so those two SQL "informational" messages don't pass back to VB, and thus the 5701 and 5703 messages in VB6 go away.

-- Thanks all.
0
 
LVL 75

Assisted Solution

by:Anthony Perkins
Anthony Perkins earned 250 total points
ID: 40033062
SO, the "BEGIN / SAVE / COMMIT TRANSACTION" stuff is not needed?
SQL statements are Atomic.  They either succeed or fail.  So in your specific case there is no need to wrap a single INSERT statement in a Transaction.
0
 

Author Closing Comment

by:Rob Rudloff
ID: 40079988
The actual error was a typo in my original SQL procedure, as described above.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now