X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1D70F9DCD3B for ; Sat, 18 Mar 2006 18:17:51 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26730-03 for ; Sat, 18 Mar 2006 18:17:52 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from gk-us2.us.michelin.com (gk-us2.michelin.com [156.65.14.19]) by postgresql.org (Postfix) with ESMTP id 608899DCCB3 for ; Sat, 18 Mar 2006 18:17:47 -0400 (AST) Received: from oncpfxp4-out.onc.michelin.com (unverified [10.21.4.32]) by gk-us2.us.michelin.com (Clearswift SMTPRS 5.1.7) with ESMTP id for ; Sat, 18 Mar 2006 17:17:34 -0500 Received: from ONCMH1.onc.michelin.com (ONCMH1.onc.michelin.com [156.65.124.40]) by oncpfxp4-out.onc.michelin.com (Postfix) with ESMTP id 861121A696 for ; Sat, 18 Mar 2006 17:17:49 -0500 (EST) Received: from oncmtap1.onc.michelin.com by oncmh1.onc.michelin.com with ESMTP for pgsql-odbc@postgresql.org; Sat, 18 Mar 2006 17:17:49 -0500 Received: from oncems01.onc.michelin.com ([156.65.125.150]) by oncmtap1.onc.michelin.com (Netscape Messaging Server 4.15) with ESMTP id IWCGLP00.71N for ; Sat, 18 Mar 2006 17:17:49 -0500 Received: from [10.43.12.183] (unverified) by oncems01.onc.michelin.com (Content Technologies SMTPRS 4.2.5) with ESMTP id for ; Sat, 18 Mar 2006 17:17:48 -0500 Message-Id: <441C8709.2080004@us.michelin.com> Date: Sat, 18 Mar 2006 17:17:45 -0500 From: "Campbell, Greg" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: How To Connect PostgreSQL thru VB without DSN References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------090907000802080609080303" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=2.232 required=5 tests=[AWL=0.080, RCVD_IN_WHOIS_INVALID=2.151, UNPARSEABLE_RELAY=0.001] X-Spam-Score: 2.232 X-Spam-Level: ** X-Archive-Number: 200603/98 X-Sequence-Number: 7384 This is a multi-part message in MIME format. --------------090907000802080609080303 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Your connection string looks fine, assuming that it is all really on one line. Your error sounds like your Driver is not properly installed. Troubleshooting: 1. In the ODBC Administrator, check the Drivers tab. Is "PostgreSQL" listed. (This corresponds to the {PostgreSQL} in your connection string. 2. In registry check HKLM\SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL -- There will be keys elaborating the location of .dlls. Do those DLLs exist. What version is your PostgreSQL server? 3. Check, does your server permit remote connections? In postgresql.conf that TCPIP_SOCKET parameter in version up to 7.4 (I think) and parameter listen_addreses in version 8+. 4. Does your PostgreSQL server permit the username and password your are trying to supply from your location? Check pg_hba.conf settings. Other checks (just for troubleshooting). Does it work if you use "DSN=myDSNname" type connection string? Can you connect with pgAdmin? BTW. The connection string will take a FQDN (fully qualified domain name) -- if you have the means for DSN translation. That is if you can successfully ping "mycomputer.mydomain.com" instead of 200.200.200.1, that'll work too. pragadheeswaran gopalakrishnan wrote: > Hi, > > I want to know How To Connect PostgreSQL thru VB throughDSN-less > connection. > > I used the following syntax > Private Sub ConnectDB > On Error GoTo EH > Dim c As New ADODB.Connection > c.open "DRIVER={PostgreSQL};SERVER=200.200.200.1 > ;port=5432;DATABASE=MyDB;UID=postgres;PWD=postgres;" > Exit Sub > EH: > Msgbox Err.Description,vbcritical,"Error Info" > End Sub > > The IP address of the machine, where PostgreSQL is installed, is > 200.200.200.1 which i noted from the Mynetwork places ---> properties ---> > Local Area Connection ---> TCP/IP Internet Protocol properties. > > The operating system installed is Win-2000 > > But , the above code gives error as [Microsoft][ODBC Driver Manager] Data > Source name not found or default driver not specified. > > I guess the value for the SERVER parameter in the above connection string > code will be wrong. Please guide me. > > -- > G.Pragadheeswaran --------------090907000802080609080303 Content-Type: text/x-vcard; charset=utf-8; name="greg.campbell.vcf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="greg.campbell.vcf" YmVnaW46dmNhcmQNCmZuOkdyZWcgQ2FtcGJlbGwNCm46Q2FtcGJlbGw7R3JlZw0Kb3JnOk1p Y2hlbGluIE5vcnRoIEFtZXJpY2EgLSBVUzUgTGV4aW5ndG9uO0VORy1BU0UNCmVtYWlsO2lu dGVybmV0OmdyZWcuY2FtcGJlbGxAdXMubWljaGVsaW4uY29tDQp0aXRsZTpBU0UgU3lzdGVt cyBFbmdpbmVlcg0KdGVsO3dvcms6ODAzLTk1MS01NTYxL3g3NTU2MQ0KeC1tb3ppbGxhLWh0 bWw6RkFMU0UNCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K --------------090907000802080609080303--