Thread: psqlODBC and MS-Access

psqlODBC and MS-Access

From
"Marc Birkett"
Date:
Hi people,
 
Many thanks to Justin Clift for pointing me to this list.

I am having a long running problem which i am hoping someone can help me with.

I have installed postgreSQL on a new gentoo install and managed to get it working correctly. I have also downloaded and installed the newest ODBC drivers i can find.

I have set-up the accounts, IP addresses and the like appropriatly but still cannot export from an access to a postgresql database. When i attempt the export command i get an error of:

"ODBC Call Failed
ERROR:Length of VARCHAR must be at least 1 (#7)."

When i attempt to export tables with no text in them (i.e. text, memo and hypertext) they export with no problems. Can anyone help me with this as i have spent a good three or four days looking for the solution.

Cheers,

Marc

 
Cheers,
 
Marc
----------------------------------------------------------------------------
The information transmitted is intended only for the person(s) or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient(s) is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.


PostgreSQL+ (Beta) and Active Server Pages with @TRANSACTION=REQUIRED

From
Chris Gamache
Date:
Anyone ever tried this successfully?

...from something.asp


<% @TRANSACTION=REQUIRED LANGUAGE=VBSCRIPT %>
<%
response.buffer = true
connstr = "Provider=MSDASQL.1;Persist Security Info=False;Extended
Properties=""DRIVER={PostgreSQL+

(Beta)};DATABASE=somedb;SERVER=db.something.com;PORT=5432;UID=someuser;PWD=somepwd;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0"""

set conn = server.createobject("adodb.connection")
conn.open connstr
sql = "select * from some_table where some_column = 'something';"
set rs = conn.execute(sql)
%>


I then get...

Microsoft OLE DB Provider for ODBC Drivers error '8004d00a'

Unknown connect option (Set)

something.asp, line 7

...

Running the script outside of an MTS transaction works fine. It crashes inside.
I was hoping that PostgreSQL+ would address this... Any ideas?

CG

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

PostgreSQL+ (Beta) and Active Server Pages with @TRANSACTION=REQUIRED

From
Chris Gamache
Date:
Anyone ever tried this successfully?

...from something.asp


<% @TRANSACTION=REQUIRED LANGUAGE=VBSCRIPT %>
<%
response.buffer = true
connstr = "Provider=MSDASQL.1;Persist Security Info=False;Extended
Properties=""DRIVER={PostgreSQL+

(Beta)};DATABASE=somedb;SERVER=db.something.com;PORT=5432;UID=someuser;PWD=somepwd;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0"""

set conn = server.createobject("adodb.connection")
conn.open connstr
sql = "select * from some_table where some_column = 'something';"
set rs = conn.execute(sql)
%>


I then get...

Microsoft OLE DB Provider for ODBC Drivers error '8004d00a'

Unknown connect option (Set)

something.asp, line 7

...

Running the script outside of an MTS transaction works fine. It crashes inside.
I was hoping that PostgreSQL+ would address this... Any ideas?

CG


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute

Re: PostgreSQL+ (Beta) and Active Server Pages with

From
Hiroshi Inoue
Date:
Chris Gamache wrote:
>
> Anyone ever tried this successfully?
>
> ...from something.asp
>
> <% @TRANSACTION=REQUIRED LANGUAGE=VBSCRIPT %>
> <%
> response.buffer = true
> connstr = "Provider=MSDASQL.1;Persist Security Info=False;Extended
> Properties=""DRIVER={PostgreSQL+
>
(Beta)};DATABASE=somedb;SERVER=db.something.com;PORT=5432;UID=someuser;PWD=somepwd;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0"""
>
> set conn = server.createobject("adodb.connection")
> conn.open connstr
> sql = "select * from some_table where some_column = 'something';"
> set rs = conn.execute(sql)
> %>
>
> I then get...
>
> Microsoft OLE DB Provider for ODBC Drivers error '8004d00a'
>
> Unknown connect option (Set)
>
> something.asp, line 7
>
> ...
>
> Running the script outside of an MTS transaction works fine. It crashes inside.
> I was hoping that PostgreSQL+ would address this... Any ideas?

Maybe MTS requires Distributed transaction support but
PostgreSQL(and of cource psqlodbc driver) doesn't support it.
I'm not sure if MTS provides the option to work with non-
distributed system.

regards,
Hiroshi Inoue
    http://w2422.nsk.ne.jp/~inoue/

Re: PostgreSQL+ (Beta) and Active Server Pages with @TRANSACTION=REQUIRED

From
Chris Gamache
Date:
Perhaps, but the MS Access ODBC Driver would run in an MTS transaction, even
though there is no transaction support in access.

I use ODBC like I drive my car. I put in the key, turn it, and it just works.
What could I do to get under the hood and find out what this mysterious "Set"
thing might require to function properly?

I don't care to even have the PostgreSQL transaction auto-roll-back when the
MTS Transaction fails. I need the transaction support for the larger operation
of which the database transactions are a small part.

CG

--- Hiroshi Inoue <Inoue@tpf.co.jp> wrote:
>
> Maybe MTS requires Distributed transaction support but
> PostgreSQL(and of cource psqlodbc driver) doesn't support it.
> I'm not sure if MTS provides the option to work with non-
> distributed system.
>
> regards,
> Hiroshi Inoue
>     http://w2422.nsk.ne.jp/~inoue/


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com