Обсуждение: How can i set several databases using Win ODBC

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

How can i set several databases using Win ODBC

От
Nicolas Briones
Дата:
I installed windows ODBC, configure everything, and all runs just fine.
But now, i need to build another application, using another Postgres
database, but ODBC only let me configure 1 database. If i try to add
another postgres DSN, it just show me the first one, and can't add another
one, only modify the first one... i refuse to accept that postgres ODBC be
so limited...



Re: How can i set several databases using Win ODBC

От
Corey Gibbs
Дата:
Howdy Nicholas,

Check into DSNless connections.

Once the driver is installed, you can refer to it in your program

dim cn as ADODB.Connection
dim rs as ADODB.Recordset

cn.Open "Driver={PostgreSQL};Server=server4;Port=5432;Database=foobar;Uid=postgres;"

at that point you can point to another database besides foobar

Once the driver's been installed and registered on teh workstation, this method will work.

hope it helps
corey


On Thursday, August 29, 2002 11:18 AM, Nicolas Briones [SMTP:nbr@designers.cl] wrote:
> I installed windows ODBC, configure everything, and all runs just fine.
> But now, i need to build another application, using another Postgres
> database, but ODBC only let me configure 1 database. If i try to add
> another postgres DSN, it just show me the first one, and can't add another
> one, only modify the first one... i refuse to accept that postgres ODBC be
> so limited...
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

Re: How can i set several databases using Win ODBC

От
Keith Gray
Дата:
I suggets you use FILE DSN not USER or SYSTEM if possible.

Nicolas Briones wrote:

> I installed windows ODBC, configure everything, and all runs just fine.
> But now, i need to build another application, using another Postgres
> database, but ODBC only let me configure 1 database. If i try to add
> another postgres DSN, it just show me the first one, and can't add another
> one, only modify the first one... i refuse to accept that postgres ODBC be
> so limited...
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


--

Keith Gray
Technical Services Manager
Heart Consulting Services


Re: How can i set several databases using Win ODBC

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Nicolas Briones [mailto:nbr@designers.cl]
> Sent: 29 August 2002 19:18
> To: pgsql-odbc@postgresql.org
> Subject: [ODBC] How can i set several databases using Win ODBC
>
>
> I installed windows ODBC, configure everything, and all runs
> just fine. But now, i need to build another application,
> using another Postgres database, but ODBC only let me
> configure 1 database. If i try to add another postgres DSN,
> it just show me the first one, and can't add another one,
> only modify the first one... i refuse to accept that postgres
> ODBC be so limited...

It's not. I have 10 or more System DSNs setup. I would be inclined to
check your ODBC installation and that you have relevant permissions to
add a DSN. psqlODBC isn't clever about reporting that it failed to
update registry keys if you don't have permission to do so (i.e. it's a
system DSN and you're not an administrator).

Regards, Dave