1 .连接字符串
connectstring="Provider=Sybase.ASEOLEDBProvider.2;Server Name="+ip+";Server Port Address=5000;Initial Catalog="+database+";User ID=user;Password=password;";
前提是需要安装oledb
2.关于 recordset->getrecordcount返回-1
recordset的open函数应该使用adOpenStatic状态
还有一个比较奇怪的问题就是m_pConnection->PutCursorLocation(adUseClient);
这个不能设置,如果我设置了用户模式的话recordset的open一直不返回,仿佛挂起了,不知道什么原因,有知道的麻烦告诉一下。