Subject Re: [IBO] Creating DB in code
Author Jason Wharton
Please see the Contact sample application for how to use the script and
check for the existence of the database..

As for adding users, look at the IB_Session interface for some methods,
Alteruser() and it will allow you to do that too. Only problem there is you
need to use the SYSDBA account and so you will need to embed the password in
the EXE somewhere.

FWIW,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Paul Schmidt" <paul@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, February 09, 2001 7:56 AM
Subject: [IBO] Creating DB in code


>
> Hi everyone
>
> Okay, slowly but surely I am getting to know the stuff I need for
> this thing.
>
> I would like to, using IBO and Delphi2, do the following in code:
>
> Create a database and all the tables, generators, triggers, etc. I
> would assume that IB_Script could be used here? However I would like
> to do this, before the user is connected to any database. Preferably
> I would like to try connecting to the database, and if it doesn't
> exist create and populate it.
>
>
> Next I would like to be able to add users to/delete users from the
> database, I think this requires services.api, is that accessable
> through Delphi, or do I need something else. What I am thinking
> here, is that the program doesn't have it's own security, if you
> exist on the database, you can use it, if you don't then you can't.
> If the user is added from the program, then it does the proper GRANT
> statements to allow the user to do stuff. I would rather that the
> user not need to use any client utilities, like IBConsole.
>
> Anyone have any ideas on either of these items?
>
>
> Paul Schmidt,
> Tricat Technologies
> Email: paul@...
> Website: www.tricattechnologies.com
>
>
>
>