8,305
社区成员
发帖
与我相关
我的任务
分享
namespace WuYuan
{
typedef UINT HDBHANDLE;
enum
{
DB_MAX_COL_NAME_LEN = 256, // 最大列名长度
};
bool DB_Ini(HDBHANDLE* pOutHandle, int maxDBNum);
void DB_End(HDBHANDLE handle);
// 这个是配置数据源
bool DB_SQLConfigDataSource(const char* szDriver, const char* szAttributes);
// 这个是连接数据库
bool DB_SQLConnect(HDBHANDLE handle, int dbcIndex, const char* szDataSourceName, const char* szUID, const char* szPWD);
// 这个是执行sql语句
bool DB_Execute(HDBHANDLE handle, int dbcIndex, const char* szSQL);
// 这个是取执行sql语句的下一条结果数据
bool DB_FetchNext(HDBHANDLE handle, int* pOutColNum);
// 这个是取执行sql语句的某列数据
bool DB_Fetch(HDBHANDLE handle, int col, char* pOutData);
}