Re: The conection dictionary at "start-up"
Re: The conection dictionary at "start-up"
- Subject: Re: The conection dictionary at "start-up"
- From: Art Isbell <email@hidden>
- Date: Fri, 10 Oct 2003 16:55:00 -1000
On Friday, October 10, 2003, at 01:05 PM, Ricardo Strausz wrote:
In the old (good) days of NeXT's EOF 1, it was very simple to call the
db-connection dictionary panel when the app was lunching in order to
set the user and password to be used by the instance.
Is this possible to do in WO 5.2??
If I recall, EOF had an API that would display a database-specific
login panel. Or this panel would be automatically displayed when a
connection to a database was attempted if the connection info was
incorrect.
I don't believe this API or behavior exists now. But you should be
able to implement it yourself without much difficulty. EOAdaptor
includes the API needed. If you require a user to log in to the DB,
open an NSPanel of your own design to collect the necessary connection
info. Maybe you can specify the techy stuff in your eomodel (e.g., the
JDBC URL) but leave the user and password empty. Then your custom
login panel could collect the user and password and add them to
EOAdaptor's connection dictionary. You could test their validity by
invoking EOAdaptor's assertConnectionDictionaryIsValid(). If this
throws no exception, you could open a channel and start accessing the
DB.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.