Does anybody create DSN source in the source code? I use
SQLConfigDataSource ODBC function and it fails ((.
Here is the code:
UCHAR lpDriver[] = "SQL Server";
UCHAR lpAttr = "DSN=SQL_Base\0DATABASE=MyDB\0Server=MyServer\0" "uid=MyLogin\0pwd=MyPassword\0\0";
int iRes = SQLConfigDataSource(0, ODBC_ADD_SYS_DSN, _
lpDriver, lpAttr)
There' re absolutely no ideas about what's wrong. Because I use the same parameters which are stored in the registry if I create system DSN source using explorer.
SQLConfigDataSource ODBC function and it fails ((.
Here is the code:
UCHAR lpDriver[] = "SQL Server";
UCHAR lpAttr = "DSN=SQL_Base\0DATABASE=MyDB\0Server=MyServer\0" "uid=MyLogin\0pwd=MyPassword\0\0";
int iRes = SQLConfigDataSource(0, ODBC_ADD_SYS_DSN, _
lpDriver, lpAttr)
There' re absolutely no ideas about what's wrong. Because I use the same parameters which are stored in the registry if I create system DSN source using explorer.