#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    34
    Rep Power
    12

    functions in db, redefining fn


    Hello, can u hel pme with these 2 things?

    1. Is it possible to store dll's in the DB system
    (f.e. postgresql) and somehow to load and use them from there?

    2. Is it possible to redefine functions used by App server and to change old version with the new one while the server is running, so after swithing them is by clients used the new one?

    Maybe to change definition, recompile dll and reload it?, but what if it is used at time,...
    Functionally I would like to do smthng as if i use an interpret language.


    thnx
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,643
    Rep Power
    4248
    1. Not sure about PostgresSQL, but it is possible to do this with SQL Server (and presumably Sybase as well, since SQL Server is derived from Sybase). It's called an Extended Stored Procedure and can be implemented in Delphi.

    2. Depends on whether the database server can unload the DLL or not. In the case of SQL server, you can unload a DLL using DBCC extendedprocdll(FREE) where extendedprocdll is the name of the DLL that contains your extended stored procedure.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    34
    Rep Power
    12

    new question


    Thanx for the answer, it solves a part of our problem, but i'll ask another question.


    We would like to be able to change,add,.. procedures and functions in our application "on the fly", while app server is running.

    We were thinking about using some Interpret language (such as VB)

    I'd like to ask if there's any way to do it in delphi,SQL (need not to be so easy)

    thank you
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,643
    Rep Power
    4248
    This is very easy to do in Delphi. You can simply use a TQuery or TStoredProc or TADOQuery or TADOStoredProc object and assign its properties at runtime and execute it.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo