PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Provider (Property)
In french: Provider
HFSQLNot available with this kind of connection
The Provider property is used to manage the type of a connection (HFSQL Client/Server, OLE DB, etc.). You can:
  • Get the type of a connection (HFSQL Client/Server, OLE DB, etc.).
  • Define the type used for the connection (HFSQL Client/Server, OLE DB, etc.). In this case, if the connection is currently opened, it will be closed then re-opened with the new parameters during a first access to a data file that is using this connection.
Remark: The connection can correspond to:
Example
MyConnection is Connection
// Describe the connection
MyConnection.User = "USER"
MyConnection.Password = "PASSWORD"
MyConnection.Server = "MYSERVER"
MyConnection.Database = "Database"
MyConnection.Provider = hAccessHFClientServer
MyConnection.Access = hOReadWrite
MyConnection.ExtendedInfo = "Extended information"
MyConnection.CursorOptions = hClientCursor
 
HOpenConnection(MyConnection)
Syntax

Finding out the type of the connection used Hide the details

<Provider> = <Connection used>.Provider
<Provider>: String constant
Type of connection used:
hAccessHF7Pseudo-connection to HFSQL Classic database
hAccessHFClientServerNative Connector to an HFSQL Client/Server database
hNativeAccessAS400Native AS/400 Connector (optional module of WINDEV/WEBDEV)
hNativeAccessDB2Native DB2 Connector (optional module of WINDEV/WEBDEV)
hNativeAccessInformixNative Informix Connector (optional module of WINDEV/WEBDEV)
hNativeAccessMariaDBNative MariaDB Connector (optional module of WINDEV/WEBDEV)
hNativeAccessMySQLNative MySQL Connector (optional module of WINDEV/WEBDEV)
hNativeAccessOracleNative Oracle Connector (optional module of WINDEV/WEBDEV)
hNativeAccessOracleLiteNative Oracle Connector (optional module of WINDEV Mobile)
hNativeAccessPostgreSQLNative PostgreSQL Connector (optional module of WINDEV/WEBDEV)
hNativeAccessProgressNative Progress Connector (optional module of WINDEV/WEBDEV)
hNativeAccessSQLAzureNative SQL Azure Connector (optional module of WINDEV/WEBDEV, provided with Native SQL Server Connector)
hNativeAccessSQLiteNative SQLite Connector (provided with WINDEV/WEBDEV)
hNativeAccessSQLServerNative SQL Server Connector (optional module of WINDEV/WEBDEV)
hNativeAccessSybaseNative Sybase Connector (optional module of WINDEV/WEBDEV)
hNativeAccessXBaseNative xBase Connector (included with WINDEV/WEBDEV)
hNativeAccessXMLNative XML Connector (included with WINDEV/WEBDEV)
hODBCOLE DB provider for ODBC (used to access an ODBC data source declared in the ODBC data sources of Windows)
hOledbAccess97OLE DB provider for Access 97
hOledbAccess2000OLE DB provider for Access 2000
hOledbDBase5OLE DB provider for dBase 5
hOledbExcel2000OLE DB provider for Excel 2000
hOledbExcel97OLE DB provider for Excel 97
hOledbLotus4OLE DB provider for Lotus 4
hOledbOracleOLE DB provider for Oracle
hOledbSQLServerOLE DB provider for SQL Server
<Connection used>: Character string or Connection variable
Name of the connection used. This name was defined:

Modifying the type of the connection used Hide the details

<Connection>.Provider = <Provider>
<Connection>: Character string or Connection variable
Name of the connection used. This name was defined:
<Provider>: String constant
Type of connection used:
hAccessHF7Pseudo-connection to HFSQL Classic database
hAccessHFClientServerNative Connector to an HFSQL Client/Server database
hNativeAccessAS400Native AS/400 Connector (optional module of WINDEV/WEBDEV)
hNativeAccessDB2Native DB2 Connector (optional module of WINDEV/WEBDEV)
hNativeAccessInformixNative Informix Connector (optional module of WINDEV/WEBDEV)
hNativeAccessMariaDBNative MariaDB Connector (optional module of WINDEV/WEBDEV)
hNativeAccessMySQLNative MySQL Connector (optional module of WINDEV/WEBDEV)
hNativeAccessOracleNative Oracle Connector (optional module of WINDEV/WEBDEV)
hNativeAccessOracleLiteNative Oracle Connector (optional module of WINDEV Mobile)
hNativeAccessPostgreSQLNative PostgreSQL Connector (optional module of WINDEV/WEBDEV)
hNativeAccessProgressNative Progress Connector (optional module of WINDEV/WEBDEV)
hNativeAccessSQLAzureNative SQL Azure Connector (optional module of WINDEV/WEBDEV, provided with Native SQL Server Connector)
hNativeAccessSQLiteNative SQLite Connector (provided with WINDEV/WEBDEV)
hNativeAccessSQLServerNative SQL Server Connector (optional module of WINDEV/WEBDEV)
hNativeAccessSybaseNative Sybase Connector (optional module of WINDEV/WEBDEV)
hNativeAccessXBaseNative xBase Connector (included with WINDEV/WEBDEV)
hNativeAccessXMLNative XML Connector (included with WINDEV/WEBDEV)
Remarks
The CtOLEDBProvider property is used to define and get the type of access to a data file handled by a connection. This property is kept for backward compatibility. It is recommended to use the Provider property.
See also
Minimum version required
  • Version 10
This page is also available for…
Comments
Example
Nagyro.ini
======================
[Nagyro]
Server = 192.168.1.180
User = sa
Password = 777777777
BD = producao
======================


PROCEDURE DB_Inicialize(TrueFalse)

Server, User, Password, BD is string

IF TrueFalse = True THEN

PathFile is string = fCurrentDir(fCurrentDrive()) +"\Nagyro.ini"

IF fFileExist(PathFile) = True THEN

Server = INIRead("Nagyro", "Server", "", PathFile)
IF ErrorOccurred THEN
Error()
END

User = INIRead("Nagyro", "User", "", PathFile)
IF ErrorOccurred THEN
Error()
END

Password = INIRead("Nagyro","Password", "", PathFile)
IF ErrorOccurred THEN
Error()
END

BD = INIRead("Nagyro", "BD", "", PathFile)
IF ErrorOccurred THEN
Error()
END

HCloseConnection(ConnNativa)

ConnNativa..Server = Server
ConnNativa..User = User
ConnNativa..Password = Password
ConnNativa..Database = BD
ConnNativa..Provider = hNativeAccessSQLServer
ConnNativa..Access = hOReadWrite
ConnNativa..ExtendedInfo = "Extended information"
ConnNativa..CursorOptions = hClientCursor

ok is boolean = HOpenConnection(ConnNativa)

IF ok = False
Info(ErrorInfo())
Close()
END

END

END
adrianoboller
09 Feb. 2015