Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-04-28
6
Medium Priority
?
1,793 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 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 1000 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 

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 1000 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

670 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