corrected to accept hostname and connect to network
[csql.git] / test / sqlnetwork / Connect / conntest7.c
blob8d21a48b31c003434af9e84fea4b681b90c9a531
1 // Pass correct user name and password ,it should pass.
3 // Author : Jitendra Lenkla
5 #include<SqlNwConnection.h>
6 #include<SqlFactory.h>
7 int main()
9 DbRetVal rv = OK;
10 AbsSqlConnection *con = new SqlNwConnection();
11 con->setInnerConnection(NULL);
12 SqlNwConnection *conn = (SqlNwConnection *) con;
13 conn->setHost("localhost", 5678);
14 rv = con->connect("root","manager");
15 if(rv!=OK)
17 printf("Test script failed with error%d\n",rv);
18 return 1;
20 printf("Connection opened with correct user name and password\n");
21 printf("Test script passed\n");
22 delete con;
23 return 0;