
Use ODBC API connect Oracle Database
SQLBindCol doesn't work on VB strings since VB likes to move them around in
RAM a lot. You need to allocate the space for the string with the API then
use API string copy commands. I've never actually done this, but I know of
people who have.
I just use the SQLGetData function to get one row at a time. It's a bit
slower, but much easier.
If you find out how to do a SQLBindCol on strings, please let me know.
--
Keith Benedict
Software Engineer
Triad Systems
: Hi,
:
: I have very exciting development, using VB5 CCE (Microsoft Beta 1) with
windows API, odbc32.dll connect Oracle database.
: I also create an ActiveX Control.
: It works, but retrieving data only show integer data field, no string
data field.
: I am struggling this problem this whole week.
: I have this kind of program working well in VB3.
: And, the result is right if I use ODBC Test.
:
: Following is my SQL Log,
:
: SQLAllocEnv(phenv01C26010);
: SQLAllocConnect(henv01C26010, phdbc001CC5E8);
: SQLConnect(hdbc001CC5E8, "pbatest", -3, "apeng", -3, "********", -3);
: SQLAllocStmt(hdbc001CC5E8, phstmt0022D240);
: SQLExecDirect(hstmt0022D240, "select rollup_id,name from rollup_summary",
-3);
: SQLBindCol(hstmt0022D240, 1, 1, rgbValue, 21, pcbValue);
: SQLBindCol(hstmt0022D240, 2, 1, rgbValue, 51, pcbValue);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLFetch(hstmt0022D240);
: SQLError(henv00000000, hdbc00000000, hstmt0022D240, szSqlState,
pfNativeError, szErrorMsg, 256, pcbErrorMsg);
: SQLFreeStmt(hstmt0022D240, 1);
:
: Obviously, there is an error.
: I appreciate any information and help.
:
: Thanks a lot.
:
: -alex
: