Thread: Connection ODBC

Connection ODBC

From
"Daniel"
Date:
Date: 06/01/03
 
    I need to connect ASP - (Active Server Pages) to the data base POSTGRESQL,  Is it possible?
    I don't know the connection string, so I need that someone can help me, and tell me some information about that.
    Are there some more special thing to do?
 
Thanks for all...
From Brazil
Sds, Daniel
 
 

Re: Connection ODBC

From
"Rick Moore"
Date:

>
> Date: 06/01/03
>
>  I need to connect ASP - (Active Server Pages)to the data base
> POSTGRESQL,Is it possible?

Yes.

>  I don't know the connection string,so Ineedthat someone can help me, and
> tell me some information about that.

I could send you a full example (of course the database table/function names,
etc. are specific to our application domain.)  The actual connection stuff is
like this:

<!-- #include file="adovbs.inc" -->
<%
... initialization stuff removed from here...

    Session("dbname") = "iprdemo"
     Set Conn = Server.CreateObject("ADODB.Connection")
     Dim constr
     constr="dsn=" + dbname + ";uid=XXX;pwd=YYY"
     Conn.Open constr

.. continued processing removed from here...
%>
<html>... remainder of html stuff removed...

>  Are there some more special thing to do?
>

We have an ODBC System DSN called "iprdemo" that points to a PostGreSQL
database on our local Intranet.  The postmaster must be running on the machine
identified in that DSN, and the user specified has to have access to the
database.

> Thanks for all...
>
> From Brazil
> Sds, Daniel
>
>

--
Rick

Intuition (n): an uncanny sixth sense which tells people
    that they are right, whether they are or not.