How to use Win32 API functions for ODBC Programming?
Posted on 1998-10-21
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
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?