Skip site navigation (1) Skip section navigation (2)

Re: ODBC TROUBLE

From: "Andrus" <eetasoft(at)online(dot)ee>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: ODBC TROUBLE
Date: 2005-12-19 19:52:18
Message-ID: do732s$s7o$1@news.hub.org (view raw or flat)
Thread:
Lists: 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



In response to

pgsql-admin by date

Next:From: Chris HooverDate: 2005-12-19 20:11:04
Subject: PG8.1 - Config file check
Previous:From: Jim C. NasbyDate: 2005-12-19 19:20:45
Subject: Re: Backup and clean up

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group