VARKON Version 1.17D 2003-02-25


odbc_connect - Function

Starts a database session
 

Description

Establishes a connection with an ODBC database. In order to make any other calls to the ODBC-functions in MBS a connection must first be established. More than one connection can not be opened simultaneousely. After a connection is established you may execute SQL statements and also retrive results. Use the odbc_disconnect() function to close the connection when it is no longer needed or before you open an new connection to another datasource.

Syntax

odbc_connect(source, username, password)
 
STRING source*132;
STRING username*132
STRING  password*132;

Principal parameters
 
source - The name of the ODBC datasource/database
username - User identification
password - User password

Optional parameters
 
None.

Return value

An INT describing the status of sucess. 0 = Ok, -1 = Error.

Comments

If negative status (-1) is returned from odbc_connect a connection was not made and the actual reason to why the function was not successful can be retrieved using odbc_error().

See also

odbc_execdirekt(), odbc_fetch(), odbc_getstring(), odbc_disconnect() and odbc_error()



 



 
 
 

VARKON Homepage Index