pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrus <eetasoft@online.ee>
To: pgsql-admin@postgresql.org
Subject: Re: ODBC TROUBLE
Date: Mon, 19 Dec 2005 21:52:18 +0200
Message-ID: <do732s$s7o$1@news.hub.org> (raw)
References: <69f2062a0512191031t72bcf31auc063f23c8f2c7156@mail.gmail.com>

> 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





view thread (2+ messages)

Message-ID: <do732s$s7o$1@news.hub.org>
Permalink:  ../do732s$s7o$1@news.hub.org/
Also on:    postgresql.org/message-id/do732s$s7o$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: eetasoft@online.ee
  Subject: Re: ODBC TROUBLE
  In-Reply-To: <do732s$s7o$1@news.hub.org>
  References: <69f2062a0512191031t72bcf31auc063f23c8f2c7156@mail.gmail.com> <do732s$s7o$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox