Multiple ConnSettings statements in connection string

Поиск
Список
Период
Сортировка
От Michael Toews
Тема Multiple ConnSettings statements in connection string
Дата
Msg-id 1753555089.1772941238010586819.JavaMail.root@jaguar9.sfu.ca
обсуждение исходный текст
Ответы Re: Multiple ConnSettings statements in connection string  (Hiroshi Inoue <inoue@tpf.co.jp>)
Список pgsql-odbc
Hi,

I am using psqlODBC version 8.03.02.00 in Windows XP in a Python script using win32com with MS Access. In this script,
Ineed to configure a connection string that sets a few run-time parameters: 

set TimeZone to -8;
set search_path to pid,public;

These need to be somehow nested in ConnSettings of the connection string, since I have no ability from MS Access to
sendthese commands. 

I've tried:
ConnSettings="set TimeZone to -8; set search_path to pid,public;" -- does neither commands
ConnSettings={set TimeZone to -8; set search_path to pid,public;} -- sends only first command

Each time, it seems to connect properly, but the second command is not issued.

--
For the curious, I'm exporting tables from within Access using (approx):

import win32com.client
ac = win32com.client.Dispatch(r'Access.Application')
acExport = 1; acTable = 0
connStr = 'Driver={PostgreSQL Unicode};Server=%s;Database=%s;Uid=%s;Pwd=%s;ConnSettings="set TimeZone to -8; set
search_pathto pid,public;"'%\ 
          (host, dbname, username, password)
ac.OpenCurrentDatabase(r'C:\mydb.mdb')
ac.DoCmd.TransferDatabase(acExport, 'ODBC Database', acConnStr, acTable, 'MyTable', 'MyTable')

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Arnold, Sandra"
Дата:
Сообщение: Re: Changing Port number in a File DSN
Следующее
От: Raul Orduna
Дата:
Сообщение: Problem with Oracle, ODBC and Postgresql