Re: ODBC TROUBLE - Mailing list pgsql-admin

From Andrus
Subject Re: ODBC TROUBLE
Date
Msg-id do732s$s7o$1@news.hub.org
Whole thread Raw
In response to ODBC TROUBLE  (jose fuenmayor <jafn82@gmail.com>)
List pgsql-admin
> 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



pgsql-admin by date:

Previous
From: Chris Hoover
Date:
Subject: PG8.1 - Config file check
Next
From: "Jim C. Nasby"
Date:
Subject: Re: binary vs. txt dumps with pg