- 论坛徽章:
- 0
|
请高手帮助解决
Use dblibrary or ctlibrary or presql , you can search it by google.
I feel dblibrary is better.
this is a do_nothing example:
- #include <stdio.h>;
- #include <sybfront.h>;
- #include <sybdb.h>;
- main()
- {
- LOGINREC *login_ptr;
- DBPROCESS *conn_ptr;
- dbinit();
- login_ptr=dblogin();
- DBSETLUSER(login_ptr,"test");
- DBSETLPWD(login_ptr,"test");
- conn_ptr=dbopen(login_ptr,"SYBASE");
- if(conn_ptr==(DBPROCESS *)NULL)
- {
- printf("Could not connect to Server!\n");
- exit(FAIL);
- }
- dbexit();
- exit(SUCCEED);
- }
复制代码 |
|