[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

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

Posted on 2014-04-28
6
Medium Priority
?
2,115 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 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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

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

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Viewers will learn how the fundamental information of how to create a table.
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.
Suggested Courses

611 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