Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8B4D39FB50A for ; Wed, 7 Mar 2007 22:31:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 52284-05 for ; Wed, 7 Mar 2007 22:31:09 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from andromeda1.neonex.com.br (dns3.neonex.com.br [201.28.22.10]) by postgresql.org (Postfix) with ESMTP id 278049FB4D5 for ; Wed, 7 Mar 2007 22:31:10 -0400 (AST) Received: from [200.206.25.4] (helo=[127.0.0.1]) by andromeda1.neonex.com.br with esmtpa (Exim 4.63) (envelope-from ) id 1HP8PY-00015Q-UX; Wed, 07 Mar 2007 23:31:23 -0300 Message-ID: <45EF7564.9020502@planit.com.br> Date: Wed, 07 Mar 2007 23:31:00 -0300 From: "Luiz K. Matsumura" Organization: Plan IT Tecnologia =?ISO-8859-1?Q?Inform=E1tica_Ltda=2E?= User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: ionut ichim CC: pgsql-odbc@postgresql.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 000722-2, 03/07/2007), Outbound message X-Antivirus-Status: Clean X-SA-Exim-Connect-IP: 200.206.25.4 X-SA-Exim-Rcpt-To: ionutichim@hotmail.com, pgsql-odbc@postgresql.org Subject: Re: Ii can't connect to postgresql with VFP 8 X-SA-Exim-Version: 4.2.1 (built Tue, 09 Jan 2007 17:23:22 +0000) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.051 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200703/47 X-Sequence-Number: 8725 Try : lnConn = SQLSTRINGCONNECT([Driver={PostgreSQL Unicode};Server=127.0.0.1;Port=5432;Database=persoane;Uid=postgres;Pwd=123456]) Hope this helps ionut ichim wrote: > I want to try postgresql with VFP 8 sp1, but i can't connect to new > created database. > I've installed pq + odbc driver. With pgAdminIII,I can connect to my > database using password '123456' and default user 'postgres',default > port 5432 ,but with VFP i can't.Connection is a local one > This is the code I use (it always gives me 'Couldn't connect to the > database!') : > > > Local lnConn > lnConn = > SQLSTRINGCONNECT([Driver={PostgreSQL};Server=127.0.0.1;Port=5432;Database=persoane;Uid=postgres;Pwd=123456]) > > If lnConn < 0 > MessageBox( "Couldn't connect to the database !" ) > ELSE > MessageBox( "OK !" ) > =SQLDisconnect( lnConn ) > > Endif > > Thanks ! > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today it's > FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org > > -- Luiz K. Matsumura Plan IT Tecnologia Informática Ltda.