Delphi Website options

Posted on 2009-12-23
Last Modified: 2012-05-08
I have acquired a Windows 2003 Virtual private Server from 1and1. I have installed mySQL 5.1 and I have Delphi 2007.

My question is: can someone provide simple, step by step instructions to setting up a simple Intraweb app which accesses the mySQL DB. i.e. do I have to configure IIS, where do I put the output file (exe or dll) from Delphi, how do I point my domains at my VPS?


Question by:WeeStinker
    LVL 13

    Expert Comment

    I'm not going to be much help, but some comments...

    Is this a linux or windows server (by IIS I assume it's windows)?
    If Linux, what flavour?
    To point your domains to your VPS, you should get the IP address of your VPS (which should be static) and ask whoever you registered your domain with, to set the name servers to the IP address of your VPS.
    If your IP address isn't static (and you shouldn't have taken a VPS if it isn't static) then there is a service called , you get something to run on your server, which polls its IP address every X minutes, and as soon as it detects a change, it informs that database of the new IP address...
    then you can use as your domain something like

    Author Comment

    It is a Windows server so that I can run Delphi web apps on it.


    Author Comment

    I think the domains are pointing to the correct (static) IP of the VPS.

    How do I do something as simple as displaying a home page?  do I put a file called index.htm in the c:\inetpub folder ?

    Apologies for my ignorance.
    LVL 13

    Assisted Solution

    Hmmm okay well like I said I can't help much cos it's not exactly my area,
    but i know that in IIS you create a default website, and then a default webpage (e.g. index.html), and then when you access your domain, i.e., the DNS servers forward you to the IP address of yor VPS, your browser then connects to that IP address using port 80 (the port for HTTP), your server will have that port open, and will go to your default website and load your default webpage.
    If you had to then, for example, create another website under the folder "example", then if you go to it would then go to that website and not the other.
    That's my understanding. Hope this helps
    LVL 4

    Accepted Solution

    Check out this question, it covers a very similar question and should cover most of the basics for you.

    After reviewing that, and the links to the Intraweb documentation and overview for deployment options, we can visit any follow-up / remaining questions and clarify anything else for you.
    LVL 4

    Assisted Solution

    IntraWeb apps are very simple to deploy.
    1. Firstly (assuming the server is running windows), create your intraweb app in application mode (.exe) and run the app on your server.
    2. You do not need to configure IIS in order to use an intraweb app unless you are creating your app as a .dll
    3. in order to use MySQL in your intraweb app, you go about it the same way as a normal delphi app wich isnt as straight forward as i could be (see below)

    Basically, there are two ways of accessing a MySQL database from a
    Delphi application: using an ODBC driver or the libmysql.dll library (wich i will not cover as ODBC is better)


    In the MySQL web site you can find the MySQL ODBC driver for Windows:

    After installing this driver you can use the BDE Data Access components
    or the ADO components to access tables or to perform queries on a MySQL

    To use ODBC, first you should create a DSN using the ODBC Data Sources
    applet of the Control Panel. For example, I created a DSN named
    MySQL_Test and configured it to log in as 'root' in the MySQL server
    located at 'localhost' (you can connect to a remote server using its IP
    address or its domain name) and open the 'mysql' database.

    In a Delphi program you would have to use a TDatabase component if you
    don't want the BDE to show the standard login prompt. You have to set
    minimally the following properties:

        AliasName = 'MySQL_Test'
        DatabaseName = 'MySQL_Test'
        LoginPrompt = False

    In a TTable or TQuery component you have to set the DatabaseName
    property to 'MySQL_Test' and that would be it.

    The advantage of using ODBC is that you can use the standard Borland
    Datasets, and the disadvantage is that you have to go thru two layers to
    get to the MySQL server (the BDE and the ODBC driver), although it must
    be said that even with ODBC, MySQL is still faster than other database


    Author Closing Comment

    Thanks. IrishBuddha, it's great to know that you'll be able to handle more detailed IntraWeb questions.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    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…

    746 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

    17 Experts available now in Live!

    Get 1:1 Help Now