void Build_SystemDSN(CString DSN_NAME ,CString Db_Path )
{
int ret;
CString Driver, Attributes;
Driver = "Microsoft Access Driver (*.MDB)";
Attributes = "DSN=" + DSN_NAME +"Uid=Admin"+"pwd=" +"DBQ=" + Db_Path ;
ret = SQLConfigDataSource(0, ODBC_ADD_SYS_DSN, Driver, Attributes);
//ret is equal to 1 on success and 0 if there is an error
If(ret==1)
AfxMessageBox( "DSN Creation Failed");
}
{
int ret;
CString Driver, Attributes;
Driver = "Microsoft Access Driver (*.MDB)";
Attributes = "DSN=" + DSN_NAME +"Uid=Admin"+"pwd=" +"DBQ=" + Db_Path ;
ret = SQLConfigDataSource(0, ODBC_ADD_SYS_DSN, Driver, Attributes);
//ret is equal to 1 on success and 0 if there is an error
If(ret==1)
AfxMessageBox( "DSN Creation Failed");
}
解决方案 »
- 请问怎样编程得出__int64类型的高32位,与低32位?
- 请教大家,如何改变CListCtrl的一个单元格的字体,使它加粗
- mfc activex 控件类 如何实现_IDTExtensibility2
- 怎么使得IDC_EDIT1获得焦点
- R6016 not enough space for thread data 的问题
- 同志们,我该怎么办啊?
- 求1和26个小写英文字母的所有排列组合算法
- *.res坏了怎麽办?这个文件是干嘛用的?谢谢谢谢!!
- 保存内容到txt文件,汉字是乱码
- 请问,有无像Word中公式编辑器那样的将文本表示的数学公司规范显示的控件或代码
- 要求实现文字竖排(急)
- 求加密源代码(能用就行)
To EA, this mdb database only create temp to connect to remote server,
can not definite when we make programe, also thank you.