I downloaded and installed the latest psqlodbc-08_02_0400.zip at
http://www.postgresql.org/ftp/odbc/versions/msi/ . I unpack and
installed it, and everything seem to be working fine. I can connect to
my PostgreSQL that is encoded UTF8 using the following connection
string, and best of all, I didn't need to redo my database.
#----------------------------------
if is_remote
mystring="Driver={PostgreSQL Unicode}; Server=www.smvfp.com;
Port=5432; Database=sql_demo; UID=leland; PWD="
else
mystring="Driver={PostgreSQL Unicode}; Server=192.168.1.109;
Port=5432; Database=sql_demo; UID=sql_demo; PWD="
endif
oConnection=SQLSTRINGCONNECT(mystring)
If oConnection < 0
cMessageTitle = 'SQLEXEC - Unable to Connect to prepare update for
smvfpvar'
cMessageText = Message()
nDialogType = 0 + 64
* 0 = OK
* 64 = Information Icon
nAnswer = Messagebox(cMessageText, nDialogType, cMessageTitle)
Endif
if oConnection > 0
*** && Remember get beginning time. Only refresh for items that have
*** && changed after you begin. Everything else in your cursors should
*** && be current.
the_string = "UPDATE arvarmstrah SET beg_time='now'"
re_val = SQLPREPARE(oConnection,the_string)
If re_val < 0
cMessageTitle = 'SQLEXEC - Unable to prepare update for arvarrah'
cMessageText = Message()
nDialogType = 0 + 64
* 0 = OK
* 64 = Information Icon
nAnswer = Messagebox(cMessageText, nDialogType, cMessageTitle)
Endif
re_val = SQLEXEC(oConnection)
If re_val < 0
cMessageTitle = 'SQLEXEC - Unable to connect to arvarrah'
cMessageText = Message()
nDialogType = 0 + 64
* 0 = OK
* 64 = Information Icon
nAnswer = Messagebox(cMessageText, nDialogType, cMessageTitle)
Endif
the_string = "SELECT beg_time from arvarrah"
re_val = SQLEXEC(oConnection,the_string,"temp_cursor")
If re_val < 0
cMessageTitle = 'SQLEXEC - Unable to create temp_cursor'
cMessageText = Message()
nDialogType = 0 + 64
* 0 = OK
* 64 = Information Icon
nAnswer = Messagebox(cMessageText, nDialogType, cMessageTitle)
Endif
beg_time = ttoc(temp_cursor.beg_time)
select temp_cursor
use
SQLDISCONNECT(oConnection)
deactivate window olexx
release window olexx
do form sqlmain
sqlmain.windowstate=2
do form sqlpkg
sqlmain.caption=sqllabel
set procedure to sql.prg
do sqlfile
read events
else
if oConnection < 0
cMessageTitle = 'Connection Error # 1'
cMessageText = Message()
nDialogType = 0 + 64
* 0 = OK
* 64 = Information Icon
nAnswer = Messagebox(cMessageText, nDialogType, cMessageTitle)
endif
return
endif
#------------------------------------------
Regards,
LelandJ
Leland F. Jackson, CPA wrote:
> I picked this up in my INBOX this morning. It appears the PostgreSQL
> folks are releasing two version of the psqlODBC driver; one for ANSI,
> and one for unicode (eg UTF8).
>
> #---------------------------------------------
> -------- Original Message --------
> Subject: [ODBC] psqlODBC 08.02.0300 Released
> Date: Tue, 01 May 2007 22:52:25 +0900
> From: Hiroshi Inoue <[EMAIL PROTECTED]>
> To: pgsql-announce <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
>
>
>
> I am pleased to announce the release of psqlODBC 08.02.0400. This
> release corrects a problem with the source tarball of the previous
> release, and fixes some some issues discovered in the code. For
> further information, please see the release notes at:
> http://psqlodbc.projects.postgresql.org/release.html
>
> With this release two versions of the driver are provided for Windows;
> 'PostgreSQL ANSI' which supports single and multibyte applications
> through the ANSI ODBC API, and 'PostgreSQL Unicode' which provides
> Unicode support through the Unicode ODBC API. On Unix systems, the
> driver type may be selected via a configure option. MSDTC is also
> supported on Windows, and 64 bit support is now included in the source
> code (binaries are not yet available).
>
> psqlODBC may be downloaded from
> http://www.postgresql.org/ftp/odbc/versions/ in source, Windows
> Installer, merge module, and basic zip file formats.
>
> Please post any bug reports to the [EMAIL PROTECTED] mailing list.
>
> I'd like to take this opportunity to thank all those involved with the
> development, testing and bug fixing of the updated driver.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate
>
> #------------------------------------
>
> Regards,
>
> LelandJ
>
>
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.