The first thing you need to know in order to open a CUBRID connection from a.NET application is how to build the database connection string.
The format of the CUBRID ADO.NETconnection string is:
ConnectionString = "server=<server address>;database=<database name>;port=<port number to use for connection to broker>;user=<user name>;password=<user password>;"
Notes:
Examples
ConnectionString = "server=127.0.0.1;database=demodb;port=30000;user=public;password="
ConnectionString = "server=10.50.88.1;database=demodb;user=public;password="
ConnectionString = "server=10.50.99.1;database=demodb;port=30000;user=public;password=secret"
As alternative, you can use the CubridConnectionStringBuilder class to build easily a connection string in the correct format. For example:
CUBRIDConnectionStringBuilder sb = new CUBRIDConnectionStringBuilder(localhost,"33000","demodb","public","");
using (CUBRIDConnection conn = new CUBRIDConnection(sb.GetConnectionString()))
{
conn.Open();
}
or:
sb = new CUBRIDConnectionStringBuilder();
sb.User = "public" ;
sb.Database = "demodb";
sb.Port = "33000";
sb.Server = "localhost";
using (CUBRIDConnection conn = new CUBRIDConnection(sb.GetConnectionString()))
{
conn.Open();
}
Latest AnnouncementsCUBRID ADO.NET Driver Stable 1.0 version has been released Official ADO.NET Driver for CUBRID is now available Installation Instructions [C...
last month
Latest AnnouncementsCUBRID ADO.NET Driver Stable 1.0 version has been released Official ADO.NET Driver for CUBRID is now available Installation Instructions [C...
3 months ago
How to add alternative hosts to a connection string in ADO.NET? - CUBRID Q&A