Solved

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

Posted on 2014-04-28
6
1,604 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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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

624 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