Link to home
Start Free TrialLog in
Avatar of aiqing
aiqing

asked on

How to use Win32 API functions for ODBC Programming?

I'm using VC++ 5.0 to develop a application which could
access SYBASE Database through ODBC.
there is a SQL statement as the following:
SELECT name,age FROM TableName WHERE name='tony'
I call SQLExeDirect() to execute it,but now I want to
substitue the name field with a variable,such as the
following :
namestring="tony";
SQLExeDirect(...,"SELECT name,age FROM TableName WHERE name=namestring",...);
at this time ,this function cannot execute properly,it show error message
that cannot recognize 'namesring'.
I want to use variable in a SQL statement,How to
solve this problem?

ASKER CERTIFIED SOLUTION
Avatar of avivl
avivl

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial