| TDengineConnect Method |
Create a database connection and initialize the connection context. The parameters that need to be provided by user.
Namespace:
TDengineDriver
Assembly:
TDengineDriver (in TDengineDriver.dll) Version: 1.0.6
Syntax public static IntPtr Connect(
string ip,
string user,
string password,
string db,
short port
)
Parameters
- ip
- Type: SystemString
FQDN used by TDengine to manage the master node. - user
- Type: SystemString
User name. - password
- Type: SystemString
Password - db
- Type: SystemString
Database name. If user does not provide it, it can be connected normally,
means user can create a new database through this connection.
If user provides a database name, means the user has created the database and the database is used by default - port
- Type: SystemInt16
Port number
Return Value
Type:
IntPtrA null return value indicates a failure.
The application needs to save the returned parameters for subsequent API calls.
Note: The same process can connect to multiple taosd processes based on ip/port
See Also