Search Postgresql Archives

Re: Postgresql Text field / Visual FoxPro Memo and ODBC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Ahh, ok.  Misunderstood what your method was.

Is there a setting in your ODBC driver for memo as text or something
like that? It's been a while since I played with pgsql from a windows /
odbc box, so I am a bit rusty here. It's just a wild guess.



On my Windows box the Postgresql ODBC driver is set with TEXT AS LongVarChar, with a maximum length of 8190. FoxPro then turns the LongVarChar into a Memo.

Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297



Margaret,

I haven't tried using text, but I came across a very similar problem
when using VARCHAR(n) columns with foxpro:

Since foxpro supports only CHAR (not VARCHAR), then if you have a table
like this:

create table foo (t varchar(6));
insert into foo (t) values ('aaa');

And, in foxpro, you do this to an updateable view of the table:
replace t with 'bbbbbbb'

Then the SQL that foxpro actually generates looks like this:
UPDATE foo SET t = 'bbbbbbb' WHERE t = 'aaa ';

Notice the WHERE clause says t = 'aaa<space><space><space>'; Trailing
whitespace is significant for varchar columns, and so the update hits no
rows.

Now, if foxpro truly thinks that your text columns are of type MEMO then
I believe it would generate the correct SQL; however, if you have your
ODBC driver set to turn text into VARCHAR(n) columns, then I believe
you're being bit by the same bug that I was: foxpro is probably padding
your value with 8000 or so blanks because it thinks your text column is
varchar(8192).

How do you figure this out? Use ethereal.

http://www.ethereal.com/

Paul Tillotson


---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux