corrected to accept hostname and connect to network
[csql.git] / test / sqlnetwork / Connect / conntest9.c
blob077f61f263818d7edb47e5575ca4aafabb97b735
1 // Pass correct username and incorrect password ,it should fail.
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","manager123");
15 if(rv==OK)
17 printf("Test script failed with error%d\n",rv);
18 return 1;
20 printf("Connection is not opened dueto Incorrect password\n");
21 printf("Test script passed\n");
22 delete con;
23 return 0;