SQL oriented scripting language that can be executed from a C++ code

M

Michal O

Hi.
I have to write a C++ code that invokes a set of SQL statements
(inserts, updates, selects etc.),
according to the system administrator's directives.

The directives should be written as a simple script.

In addition to the SQL statements invocation,
the script should enable using query results as an input to other SQL statements,
and should be able to handle multiple query results.
The script writer should be able to access informaion from the C++ program.

Do you have any recommendation for a suitable scripting language,
that is well integrated with C++?
(I used to work with Java-->Jython and Iv'e been thinking of something similar,
but for C++, and more SQL oriented).
Thanks.
 
E

Evan Carew

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Part of every standard DBMS installation is something called an embedded
compiler (really, an embedded precompiler). This takes your C or C++
code & compiles it with the appropriate vendor's C library calls based
on the simplified SQL scripts you embedded in your code. For an example
of this, have a look at PostgreSQL's embedded compiler.

Evan

Michal said:
Hi.
I have to write a C++ code that invokes a set of SQL statements
(inserts, updates, selects etc.),
according to the system administrator's directives.

The directives should be written as a simple script.

In addition to the SQL statements invocation,
the script should enable using query results as an input to other SQL statements,
and should be able to handle multiple query results.
The script writer should be able to access informaion from the C++ program.

Do you have any recommendation for a suitable scripting language,
that is well integrated with C++?
(I used to work with Java-->Jython and Iv'e been thinking of something similar,
but for C++, and more SQL oriented).
Thanks.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFBUiKpoo/Prlj9GScRAhqQAJ4qPkai/MrzDlqcsvxWtDRRbX6jcwCfeHJa
lIIKbWJHsM+K94eUNpxbPd8=
=qCBx
-----END PGP SIGNATURE-----
 
K

Kurt Krueckeberg

Hi.
I have to write a C++ code that invokes a set of SQL statements
(inserts, updates, selects etc.),
according to the system administrator's directives.

The directives should be written as a simple script.

In addition to the SQL statements invocation,
the script should enable using query results as an input to other SQL
statements,
and should be able to handle multiple query results.
The script writer should be able to access informaion from the C++
program.

Do you have any recommendation for a suitable scripting language,
that is well integrated with C++?
(I used to work with Java-->Jython and Iv'e been thinking of something
similar,
but for C++, and more SQL oriented).
Thanks.

I don't now if this helps, but if you use MySql as the database, it has a
C++ API.
 
C

Costa B.

I think you should provide more details. Do you want to implement a client
SQL interpreter? Various DBMS systems provide several interfaces, from ODBC
to low level API or the dreaded OLE DB. There are also a bunch of client
libraries C++ that wrap ODBC or driver specific API in a more unified way.
One of them is source pro db from roguewave
http://www.roguewave.com/products/sourcepro/db/ and another one, cheaper,
is sql api: http://www.sqlapi.com/

On the other hand several DBMS systems provide a SQL language that you can
use to write scripts to do whatever you want: Oracle has PL/SQL, SQL Server
has Transact-SQL etc.

Costa
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,992
Messages
2,570,220
Members
46,807
Latest member
ryef

Latest Threads

Top