Обсуждение: jdbc connection string

Поиск
Список
Период
Сортировка

jdbc connection string

От
Bhushan Bhangale
Дата:
Hi All,

I serached the archives but couldn't find what I am looking for. I am new to
postgres. I want to know connection string which I need to connect to
postgres database using jdbc.

In informix I do

jdbc:informix-sqli://devdb:12000/dcslive:INFORMIXSERVER=devdbv2;USER=bb;PASS
WORD=bb;OPTOFC=1

I want same kind of thing for postgres.

Can anyone please help me?

Thanks
Bhsuhan

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Re: jdbc connection string

От
Peter Eisentraut
Дата:
Bhushan Bhangale wrote:
> I serached the archives but couldn't find what I am looking for. I am
> new to postgres. I want to know connection string which I need to
> connect to postgres database using jdbc.

Consider reading the documentation.


Re: jdbc connection string

От
Kris Jurka
Дата:

On Tue, 27 Jan 2004, Bhushan Bhangale wrote:

> Hi All,
>
> I serached the archives but couldn't find what I am looking for. I am new to
> postgres. I want to know connection string which I need to connect to
> postgres database using jdbc.
>
> In informix I do
>
> jdbc:informix-sqli://devdb:12000/dcslive:INFORMIXSERVER=devdbv2;USER=bb;PASS
> WORD=bb;OPTOFC=1
>

http://www.postgresql.org/docs/current/static/jdbc-use.html#JDBC-CONNECT

Kris Jurka



Re: jdbc connection string

От
Bhushan Bhangale
Дата:
Thanks Kris,

But I am looking for a connection string for postgres in which I can specify
username and password as well.

-----Original Message-----
From: Kris Jurka [mailto:books@ejurka.com]
Sent: 27 January 2004 17:19
To: Bhushan Bhangale
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] jdbc connection string




On Tue, 27 Jan 2004, Bhushan Bhangale wrote:

> Hi All,
>
> I serached the archives but couldn't find what I am looking for. I am new
to
> postgres. I want to know connection string which I need to connect to
> postgres database using jdbc.
>
> In informix I do
>
>
jdbc:informix-sqli://devdb:12000/dcslive:INFORMIXSERVER=devdbv2;USER=bb;PASS
> WORD=bb;OPTOFC=1
>

http://www.postgresql.org/docs/current/static/jdbc-use.html#JDBC-CONNECT

Kris Jurka



________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Re: jdbc connection string

От
Kris Jurka
Дата:

On Tue, 27 Jan 2004, Bhushan Bhangale wrote:

> Thanks Kris,
>
> But I am looking for a connection string for postgres in which I can specify
> username and password as well.

You can pass in the username and password by appending url parameters, for
example:

jdbc:postgresql://localhost:5432/mydb?user=fred&password=secret

Kris Jurka


Re: jdbc connection string

От
Bhushan Bhangale
Дата:
It works Kris, thanks!

-----Original Message-----
From: Kris Jurka [mailto:books@ejurka.com]
Sent: 27 January 2004 19:23
To: Bhushan Bhangale
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] jdbc connection string




On Tue, 27 Jan 2004, Bhushan Bhangale wrote:

> Thanks Kris,
>
> But I am looking for a connection string for postgres in which I can
specify
> username and password as well.

You can pass in the username and password by appending url parameters, for
example:

jdbc:postgresql://localhost:5432/mydb?user=fred&password=secret

Kris Jurka


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________