提交 26b5944b 编写于 作者: H Hui Li

[modify]

上级 f7a18273
......@@ -19,15 +19,15 @@ int main(int argc, char *argv[])
TAOS_STMT *stmt;
// connect to server
//if (argc < 2) {
// printf("please input server ip \n");
// return 0;
//}
if (argc < 2) {
printf("please input server ip \n");
return 0;
}
// init TAOS
taos_init();
taos = taos_connect("127.0.0.1", "root", "taosdata", NULL, 0);
taos = taos_connect(argv[1], "root", "taosdata", NULL, 0);
if (taos == NULL) {
printf("failed to connect to db, reason:%s\n", taos_errstr(taos));
exit(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册