Please don't repeat your questions. Instead specify what _you_ have done
to try and find a solution.
C++ is obviously C++ and don't want anything but C++ in the source. If you
want to insert raw SQL statements directly into the code, you have to
search - google is recommended - for any preprocessor that may locate the
SQL statements, and replace them with proper C++ code to do what you want.
Else, you have yourself to write C++ code to access the database...
Look at the following ref:
http://www.tek-tips.com/gfaqs.cfm/pid/207/fid/4247
There are a huge number of other references how to access SQL databases
from a C/C++ program.
With Microsoft Access, you might beside ODBC also try ADO or DAO.
For ODBC you might use ODBC functions directly, or check out frameworks
such as wxWidgets:
http://www.wxwidgets.org/
/Per W
On Fri, 9 Jul 2004, THAMAE wrote:
>
>
>
> Hi there!
>
> I am writting a programm that interfaces between C++ and Ms Access and I am trying embed some SQL statements. how do I declare the host variable? I came across the following sample to declare host variables but it does not work:
>
> EXEC SQL BEGIN DECLARE SECTION;
>
> char no[10], char name[15];
>
> double value;
>
> EXEC SQL END DECLARE SECTION;
>
> I get the following errors: EXEC undelared, parse error before END.
>
> I aapriciate your help.
>
>
>
> THAMAE
>
>
>
>
>
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
|