Thread: SQL function

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

    Join Date
    Jul 2012
    Posts
    23
    Rep Power
    0

    SQL function


    I'm re-using a sql expression that generates html to make a field "hot" with the "Mailto" link, and would like to store it as a function that can be called with arguments. If FB sql supports this, pls send me a pointer.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jan 2006
    Location
    Carlsbad, CA
    Posts
    2,055
    Rep Power
    383
    Show us what you have so far and explain what is missing
    then we can probably offer some useful advice.

    Clive
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2008
    Posts
    55
    Rep Power
    6

    Thumbs up


    you could store the HTML file in a binary BLOB type, and then when you send it, you should use the read and write like STREAM.

    Find forum posts: How to read and save a file in a BLOB type field and you'll understand how to do it.

    To send the file attached to an email, you can use various forms and components (like Indy that comes with Delphi) or WinExec function (Windows API - see help for details)

    Basically, it would be this way!

  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    249
    Rep Power
    14
    Firebird 3 supports SQL Stored Functions, earlier versions don't.
    Martijn Tonies
    Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
    Upscene Productions
    http://www.upscene.com

IMN logo majestic logo threadwatch logo seochat tools logo