Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Getting started
Wed, Jun 6 2007 12:06 PMPermanent Link

Hi,

I just bought the ODBC driver so I can link an external app to a database
I can operate on with Delphi. I seem to be missing a bit of the jigsaw
though - a sort of "how to roll this out" document. I've bought the source
version for security but don't really want to touch that.

I'm going to use the 5 user server thing so I can learn about that too,
and I presume that it will help with the two users here who will be
accessing the database using ODBC. There is help for the server, so
obviously I can get that going, but no obvious admin tool to fiddle with
settings. There are in the main DBISAM manual a load of functions to
manage the server though - is there a sample server admin tool available?

As for the ODBC DLL, how do I get to install that on an end user machine?
The ODBC installer seems to have registered something, but obviously
that's not a good solution for end user use. Is there an end user
installer available? I saw all the info on registry entries, but I'd be
much happier with a demo installer script for something like Inno (or the
installer itself frankly).

But in general, I'm really just hoping for a pointer to how to get this
working easily on an "end user" PC. I suspect I've just not found some
documentation not in the installation. Thanks for any info!

/Matthew Jones/
Wed, Jun 6 2007 3:47 PMPermanent Link

Chris Holland

SEC Solutions Ltd.

Avatar

Team Elevate Team Elevate

Hi Matt,

I do a test of the registry for the keys for an installed ODBC driver at
program startup, and set the keys if they are missing.

Below is a code example in C#


string OdbcDriverKey =
@"HKEY_LOCAL_MACHINE\Software\Odbc\Odbcinst.ini\My ODBC Driver";

string OdbcDriverListKey =
@"HKEY_LOCAL_MACHINE\Software\Odbc\Odbcinst.ini\ODBC Drivers";

public void TestForOdbcDriver()
{
   try
        {
     if (Registry.GetValue(OdbcDriverKey, "Driver", null) == null)
            ResetOdbcDriver();
        }
        catch (UnauthorizedAccessException ae)
        {
          MessageBox.Show(ae.Message);
        }
        catch (System.Security.SecurityException se)
        {
          MessageBox.Show(se.Message);
        }
}

/// <summary>
/// Reset the ODBC driver to the current one
/// </summary>
public void ResetOdbcDriver()
{
  try
  {
    string OdbcDriverFile = Application.StartupPath + @"\MyOdbc.dll";

    Registry.SetValue(OdbcDriverListKey, "My ODBC Driver",Installed");

    Registry.SetValue(OdbcDriverKey, "Driver", OdbcDriverFile);
    Registry.SetValue(OdbcDriverKey, "Setup", OdbcDriverFile);
    Registry.SetValue(OdbcDriverKey, "DriverODBCVer", "03.00");
    Registry.SetValue(OdbcDriverKey, "UsageCount", 1);
  }
  catch (UnauthorizedAccessException ae)
  {
    MessageBox.Show(ae.Message);
  }
  catch (System.Security.SecurityException se)
  {
    MessageBox.Show(se.Message);
  }
}

You will notice that I copied the ODBC driver to my application
directory and renamed it to "MyODBC.DLL" then set the registry to point
to this driver.

Chris Holland
Wed, Jun 6 2007 4:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< I'm going to use the 5 user server thing so I can learn about that too,
and I presume that it will help with the two users here who will be
accessing the database using ODBC. There is help for the server, so
obviously I can get that going, but no obvious admin tool to fiddle with
settings. There are in the main DBISAM manual a load of functions to manage
the server though - is there a sample server admin tool available? >>

Yes, you can use the Server Administration Utility found in the Additional
Software and Utilities download here:

http://www.elevatesoft.com/scripts/download.dll?action=downinfo&producttype=dbisamadd&version=4

<< As for the ODBC DLL, how do I get to install that on an end user machine?
The ODBC installer seems to have registered something, but obviously that's
not a good solution for end user use. Is there an end user installer
available? I saw all the info on registry entries, but I'd be much happier
with a demo installer script for something like Inno (or the installer
itself frankly). >>

I've attached the latest Inno Setup script that we use.

--
Tim Young
Elevate Software
www.elevatesoft.com





Attachments: setupscr.iss
Thu, Jun 7 2007 4:36 AMPermanent Link

Many thanks.

/Matthew Jones/
Thu, Jun 7 2007 4:36 AMPermanent Link

Tim, thanks for that. I'd forgotten about the admin tools being separate.

It might be nice to include the install script with the installation, but
maybe that's something for ElevateDB's version.

/Matthew Jones/
Thu, Jun 7 2007 12:34 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< It might be nice to include the install script with the installation, but
maybe that's something for ElevateDB's version. >>

I'll probably include it in the documentation, at the very least.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image