Click here to Skip to main content
15,901,666 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Getting size of file? Pin
Moochie514-Feb-05 16:24
Moochie514-Feb-05 16:24 
GeneralRebar problems! Pin
Temuri13-Feb-05 6:38
Temuri13-Feb-05 6:38 
GeneralRe: Rebar problems! Pin
Neville Franks13-Feb-05 9:57
Neville Franks13-Feb-05 9:57 
GeneralRe: Rebar problems! Pin
Temuri13-Feb-05 20:19
Temuri13-Feb-05 20:19 
GeneralRe: Rebar problems! Pin
Neville Franks13-Feb-05 20:29
Neville Franks13-Feb-05 20:29 
GeneralRe: Rebar problems! Pin
Temuri13-Feb-05 21:40
Temuri13-Feb-05 21:40 
GeneralRe: Rebar problems! Pin
Neville Franks14-Feb-05 9:29
Neville Franks14-Feb-05 9:29 
GeneralSQLConnect With Custom ODBC Driver Pin
KalliMan13-Feb-05 6:06
KalliMan13-Feb-05 6:06 
Dear all,
I'm trying to write an ODBC Driver DLL. I register it with
SQLInstallDriverEx and Implement "ConfigDSN" and "SQLConnect". With
"SQLConfigDataSource" i register Some Data source( ds1 ), but if I try to
connect via "SQLConnect" ODBC's "SQLGetDiagRec" return "Driver Doesn't
support this function" !?!?.
I found my DSN ( ds1 )in ODBC Data sources in Control Panel, and when i open
it, ODBC shows an error message "Driver's ConfigDSN : Component not found in
registry". But in registry in "ODBCINST" I have "ConnectFunctions=YNN" which
mean that I support "ConfigDSN" !?!. The same situation after reinstal MDAC.
My DLL's functions work fine if i load dll with "Afx/LoadLibrary".
What is Wrong?

Win2000 SP3, MDAC 2.8

--------------------
Here is my Driver String which i use to register my Odbc driver:
LPCTSTR pszDriver =
_T("MyDriver\0DRIVER=MyDriver.dll\0SETUP=MyDriver.dll\0SQLLevel=1\0FileUsage=0\0DriverODBCVer=01\0ConnectFunctions=YNN\0APILevel=2\0CPTimeout=60\0\0");

SQLInstallDriverEx(pszAttributes ,NULL, szLoc, FILENAME_MAX, &nLocLen,
ODBC_INSTALL_COMPLETE, &nUsageCount );
--------------------

Here is my sample code for Connection
----------------------
rc = SQLAllocHandle(SQL_HANDLE_ENV,SQL_NULL_HANDLE,&henv);

rc = SQLSetEnvAttr(henv,SQL_ATTR_ODBC_VERSION,(SQLPOINTER)SQL_OV_ODBC3,0);

rc = SQLAllocHandle(SQL_HANDLE_DBC,henv,&hdbc);

rc = SQLConnect(hdbc,(SQLCHAR*) "ds1", SQL_NTS, (SQLCHAR*) "", SQL_NTS,
(SQLCHAR*) "", SQL_NTS);

----------------------

Regards :
KalliMan




a
QuestionHow to read/write an object of MyClass from/to a file. Pin
six_billion13-Feb-05 5:59
six_billion13-Feb-05 5:59 
AnswerRe: How to read/write an object of MyClass from/to a file. Pin
KalliMan13-Feb-05 6:12
KalliMan13-Feb-05 6:12 
GeneralRe: How to read/write an object of MyClass from/to a file. Pin
six_billion14-Feb-05 5:21
six_billion14-Feb-05 5:21 
AnswerRe: How to read/write an object of MyClass from/to a file. Pin
Ravi Bhavnani13-Feb-05 8:30
professionalRavi Bhavnani13-Feb-05 8:30 
AnswerRe: How to read/write an object of MyClass from/to a file. Pin
six_billion13-Feb-05 16:42
six_billion13-Feb-05 16:42 
GeneralBM_SETIMAGE strange displaying behavior Pin
toxcct13-Feb-05 4:48
toxcct13-Feb-05 4:48 
GeneralRe: BM_SETIMAGE strange displaying behavior Pin
PJ Arends13-Feb-05 10:23
professionalPJ Arends13-Feb-05 10:23 
GeneralRe: BM_SETIMAGE strange displaying behavior Pin
toxcct13-Feb-05 23:48
toxcct13-Feb-05 23:48 
GeneralDLL Question Pin
Steve Messer13-Feb-05 4:42
Steve Messer13-Feb-05 4:42 
GeneralRe: DLL Question Pin
Mohammad A Gdeisat13-Feb-05 5:37
Mohammad A Gdeisat13-Feb-05 5:37 
GeneralRe: DLL Question Pin
Steve Messer13-Feb-05 7:44
Steve Messer13-Feb-05 7:44 
GeneralRe: DLL Question Pin
14-Feb-05 5:50
suss14-Feb-05 5:50 
GeneralRe: DLL Question Pin
Steve Messer14-Feb-05 5:55
Steve Messer14-Feb-05 5:55 
Generaladd scroll bars to an activex Pin
sstoyan13-Feb-05 4:32
sstoyan13-Feb-05 4:32 
GeneralProgramming a web cam Pin
neilshelton13-Feb-05 2:59
neilshelton13-Feb-05 2:59 
GeneralRe: Programming a web cam Pin
Ted Ferenc13-Feb-05 3:55
Ted Ferenc13-Feb-05 3:55 
GeneralAccess a table of an access database Pin
wushli13-Feb-05 2:01
wushli13-Feb-05 2:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.