ODBC API Declarations/Help needed in getting SQLExecDirect results 
Author Message
 ODBC API Declarations/Help needed in getting SQLExecDirect results

Hi

Can anybody provide the 16 bit ODBC declarations for the following
functions for VB 4:

SQLDescribeCol
SQLColumnAttributes
SQLBindCol
SQLGetInfo

Can anybody tell me why they are not included in the API declarations
accompanying VB4 prof. edition? Does this mean it is not
recommended/supported to use the above functions?

Also, I have managed to execute an SQL statement using SQLExecute but
don't know how to get the results back (Oracle 7.2 database, VB4 16
bit):

gblRc = SQLAllocEnv(gblHenv)
gblRc = SQLAllocConnect(gblHenv, gblHdbc)
gblRc = SQLConnect(gblHdbc, mSource, Len(mSource), mUser, Len(mUser),
mPwd, Len(mPwd))
gblRc = SQLAllocStmt(gblHdbc, gblHstmt)
SQLstring = "SELECT First_Name, Last_Name FROM Users"
gblRc = SQLExecDirect(gblHstmt, SQLstring, Len(SQLstring))
gblRC = SQLFetch(gblHstmt)

Now how do I get the results from the above?

Can anybody help?

Thanks.

Samir



Wed, 15 Sep 1999 03:00:00 GMT  
 ODBC API Declarations/Help needed in getting SQLExecDirect results

Why don't you get the VBSQL.VBX free from microsoft
for these API's

--
Michael Gernaey
Microsoft Corporation( I don't own it I just work there ;) )
MSN Operations Development
NT/SQL Server VB/C++



Quote:
> Hi

> Can anybody provide the 16 bit ODBC declarations for the following
> functions for VB 4:

> SQLDescribeCol
> SQLColumnAttributes
> SQLBindCol
> SQLGetInfo

> Can anybody tell me why they are not included in the API declarations
> accompanying VB4 prof. edition? Does this mean it is not
> recommended/supported to use the above functions?

> Also, I have managed to execute an SQL statement using SQLExecute but
> don't know how to get the results back (Oracle 7.2 database, VB4 16
> bit):

> gblRc = SQLAllocEnv(gblHenv)
> gblRc = SQLAllocConnect(gblHenv, gblHdbc)
> gblRc = SQLConnect(gblHdbc, mSource, Len(mSource), mUser, Len(mUser),
> mPwd, Len(mPwd))
> gblRc = SQLAllocStmt(gblHdbc, gblHstmt)
> SQLstring = "SELECT First_Name, Last_Name FROM Users"
> gblRc = SQLExecDirect(gblHstmt, SQLstring, Len(SQLstring))
> gblRC = SQLFetch(gblHstmt)

> Now how do I get the results from the above?

> Can anybody help?

> Thanks.

> Samir



Wed, 15 Sep 1999 03:00:00 GMT  
 ODBC API Declarations/Help needed in getting SQLExecDirect results

Quote:

>Hi
>Can anybody provide the 16 bit ODBC declarations for the following
>functions for VB 4:
>SQLDescribeCol
>SQLColumnAttributes
>SQLBindCol
>SQLGetInfo

Declare Function SQLDescribeCol Lib "odbc.dll" (ByVal hstmt&, ByVal
icol%, ByVal SzColName$, ByVal cbColNameMax%, pcbColName%, pfSqlType%,
pcbColDef&, pibScale%, pfNullable%) As Integer

Declare Function SQLColAttributes Lib "odbc.dll" (ByVal hstmt&, ByVal
icol%, ByVal fDescType%, rgbDesc As Any, ByVal cbDescMax%, pcbDesc%,
pfDesc&) As Integer

Declare Function SQLBindCol Lib "odbc.dll" (ByVal hstmt&, ByVal icol%,
ByVal fCType%, rgbValue As Any, ByVal cbValueMax&, pcbValue&) As
Integer

Declare Function SQLGetInfo Lib "odbc.dll" (ByVal hdbc&, ByVal
fInfoType%, rgbInfoValue As Any, ByVal cbInfoMax%, cbInfoOut%) As
Integer

If you still can not retrieve data from your SQL query, let me know
and I'll send some samples on how!

Tom Nguyen



Fri, 17 Sep 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need ODBC API Function declaration

2. VB/Access ODBC API Declarations.

3. 32 Bit ODBC API Function Declarations

4. ODBC 3.0 API declarations

5. ODBC API's declaration for VB?

6. ODBC 3.0 API declarations

7. VB/Access ODBC API Declarations.

8. VB/Access ODBC API Declarations.

9. ODBC API Help Needed!

10. Help needed getting the ChooseFont api function to work

11. Need help and examples of getting and setting various mixer volumes and mute status through API

12. Need ListView API constant declarations

 

 
Powered by phpBB® Forum Software