X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2FEC29DC86C for ; Mon, 19 Dec 2005 16:21:38 -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 38521-08 for ; Mon, 19 Dec 2005 16:21:37 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by postgresql.org (Postfix) with ESMTP id 368989DC9D6 for ; Mon, 19 Dec 2005 16:21:35 -0400 (AST) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id jBJKLYjN040338 for ; Mon, 19 Dec 2005 20:21:34 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id jBJJr1V0028958 for pgsql-admin@postgresql.org; Mon, 19 Dec 2005 19:53:01 GMT (envelope-from news) From: "Andrus" X-Newsgroups: pgsql.admin Subject: Re: ODBC TROUBLE Date: Mon, 19 Dec 2005 21:52:18 +0200 Organization: Hub.Org Networking Services Lines: 74 Message-ID: References: <69f2062a0512191031t72bcf31auc063f23c8f2c7156@mail.gmail.com> X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=-1.392 required=5 tests=[ALL_TRUSTED=-1.44, AWL=0.048] X-Spam-Score: -1.392 X-Spam-Level: X-Archive-Number: 200512/204 X-Sequence-Number: 19924 > Hi all, I been having a weird problem with the postgresql odbc driver, I > am working on an aplication in ms visual fox pro which use to have a > database in MS SQL Server I am migrating it to postgres, the problem with > the driver is that when I put the user name and password, the driver gives > me an error telling me that the schema=username does not exist, I dont > have a clue of why is this happening Ihave checked if I've introduced the > data of the connection more than once but it seems I am not doing this, > thanks in advance anyone that can help me. Change connection parameters and try the following code in vfp 9 (modify it to previous versions) Andrus. CLOSE ALL CLEAR ALL SET TALK OFF SET ECHO OFF SET SAFETY OFF set cpdialog off set reso off ACTIVATE SCREEN CLEAR cConnString ="DRIVER={PostgreSQL Unicode};DATABASE=postgres;"+ ; "SERVER=127.0.0.1;PORT=5432;UID=postgres;PWD=aaaa;B9=0" nconnh=SQLSTRINGCONNECT(cconnstring) IF nconnh<=0 LOCAL laerror[1] AERROR(laError) MESSAGEBOX( laerror[1,2]) RETURN ENDIF TEXT TO csql CREATE temp table test ( test char(1)); insert into test values (''); select 0 as foo, 1 as bar from test ENDTEXT LOCAL oCadapter as CursorAdapter oCadapter = CREATEOBJECT('cursoradapter') oCadapter.DataSource= nconnh oCadapter.DataSourceType ="ODBC" oCadapter.SelectCmd = csql oCadapter.CursorFill() BROWSE