Board index » jbuilder » Relative path t db connection

Relative path t db connection


2004-04-17 07:27:01 AM
jbuilder20
Hi,
I have completed my application and now want to deploy it. However, i would
like to make the path in the connection wizard to my database be relative ie
/Database, would be the folder that holds the db. I have my database object
in a datamodule along with qds and the like, but i would like to know if i
can make the connection URL relative and not absolute.
Thanks
Rudy
 
 

Re:Relative path t db connection

In < XXXX@XXXXX.COM >Rudy wrote:
Quote
Hi,

I have completed my application and now want to deploy it. However, i
would like to make the path in the connection wizard to my database be
relative ie /Database, would be the folder that holds the db. I have
my database object in a datamodule along with qds and the like, but i
would like to know if i can make the connection URL relative and not
absolute.
Not in the way I think you mean.. but then I could be
missunderstanding what you want here...
The restrictions you face are NOT at the JDBC end but at the database
end. JDBC just hands the connection params to the database. If that
database can understand relative directory addressing then.. well.. it
should work.. Frankly I have yet to see such a beast..
John..
--
=============================================
TeamB are volunteer helpers. Please DO NOT REPLY VIA EMAIL!
Post all questions and replies to this newsgroup ONLY
For papers on DataExpress, Applets, JSP, and Web Development go to:
www.microps.com/mps/papers.html
====================================================
 

Re:Relative path t db connection

Rudy wrote:
Quote
Hi,

I have completed my application and now want to deploy it. However, i
would like to make the path in the connection wizard to my database be
relative ie
/Database, would be the folder that holds the db. I have my database
object in a datamodule along with qds and the like, but i would like to
know if i can make the connection URL relative and not absolute.

Thanks
Rudy
I always make a config file, that is read on startup to handle this. Can be
any structure you want. Here is a XML example below:
<?xml version 1.0>
<DataConnections>
<Driver>com.mysql.jdbc.Driver</Driver>
<URL>jdbc:mysql://somehost/dbname
</DataConnections>
Have a method read and apply these settings in your DBConnection class on
initialization.
 

{smallsort}

Re:Relative path t db connection

Hi Thanks for the reply, i managed to just change the connection descriptor
to /<dir>/database in the code, so it was ok in the end.
Thanks for your time
Rudy
"pnichols" < XXXX@XXXXX.COM >wrote in message
Quote
Rudy wrote:

>Hi,
>
>I have completed my application and now want to deploy it. However, i
>would like to make the path in the connection wizard to my database be
>relative ie
>/Database, would be the folder that holds the db. I have my database
>object in a datamodule along with qds and the like, but i would like to
>know if i can make the connection URL relative and not absolute.
>
>Thanks
>Rudy

I always make a config file, that is read on startup to handle this. Can
be
any structure you want. Here is a XML example below:

<?xml version 1.0>
<DataConnections>
<Driver>com.mysql.jdbc.Driver</Driver>
<URL>jdbc:mysql://somehost/dbname
</DataConnections>

Have a method read and apply these settings in your DBConnection class on
initialization.