Subject Re: [firebird-python] Is it possible to execute a sql script with KInterbasDB?
Author Jorge
Short anwser: Yes, you can.
Long anwser:
    import kinterbasdb
    if not kinterbasdb.initialized:
        kinterbasdb.init(type_conv=200,concurrency_level=1)
           
    con = kinterbasdb.connect(
        host='192.168.0.101', database='/data/db/pool.fdb',
        user='sysdba', password='masterkey',
        dialect=3, # necessary for all dialect 1 databases
        charset='UTF8' # specify a character set for the connection
        )
    cur = con.cursor()
    cur.execute('HERE YOU SCRIPT')
    cur.execute('HERE YOU SCRIPT')

don't forget the commits.




On Sun, Apr 19, 2009 at 12:07 AM, Sasha Matijasic <sasha.matijasic@...> wrote:


>
> Can you be more especific?
> What you mean by a script? A python program? or SQL statement?
>

Sorry for not being clear enough. I meant SQL script.
Basically I have a script that creates tables, stored procedures...
and I'd like to execute it on empty database.
Something like FbScript in .Net driver (I think it's called that, not
really sure)

sasha