Pass parameters to/between SQL scripts with Firebird ISQL

Posted on 2007-07-25
Last Modified: 2013-12-09
How can I pass parameters to/between SQL scripts with Firebird  (v1.5) ISQL?

For example, I have a generic script to create a new database, with all the objects and standing data I requrie. but I want to be able to pass in paramers such as DB File Name, User, Password etc.
Question by:lappins
    LVL 19

    Accepted Solution

    assuming unix platform this is easy. contains

    isql ....... << !!

    update mytable set last_update = 'now', last_done_by = '$1';


    and is called as fred

    if your name is fred
    LVL 7

    Author Comment

    I am on a Windows platform.

    The example you provide is not passing parameters, but generating a script with the appropriate values included. Is it not possible to pass parameters in Firebird ISQL?
    LVL 19

    Expert Comment

    in that case I'm not sure what you mean, the isql command-line tool takes parameters (dbpath, username, etc).

    isql localhost:c:/db/mydb -user myname ........

    it also has a -i option to get it's instructions (create, etc) from a named file
    LVL 7

    Author Comment

    The answer is that ISQL does not offer a facility to pass parameters, but the methos described by NickUpson is a workable workaround.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    CCModeler offers a way to enter basic information like entities, attributes and relationships and export them as yEd or erviz diagram. It also can import existing Access or SQL Server tables with relationships.
    Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now