Back

Topic

[KB314]SVSQL mode CONNECT – Return Code: 0

Tags: MSSqlServer, Scada Basic, SQL, SQL Server

14 years ago
By RM
Options
Print
Applies to:

PcVue all versions.


Summary:

The SCADA Basic instruction, SVSQL mode CONNECT, return code 0 is not documented in the online help.

The online help describes the verb “CONNECT “ in the following way:

svSQL

Return code of SVSQL(“CONNECT, …) is 0.


Solution:

The return code 0 is returned when the user tries to connect to a SQL Server database by using a User-DSN or a System-DSN that is configured for SQL Server authentication and no login name and password is specified or one of the two parameters is missing.
The other way around (if you specify a username and a password when connection over Windows authentication) there is no error: The connection handle or -1 is returned.


Created on: 23 Dec 2010 Last update: 13 May 2024