Field |
Original Value |
New Value |
Description
|
I have table with field
{code}
"field" "Text" /* "Text" = VARCHAR(5000) */,
{code}
One record have text of about 2500 chars in this field.
If I select this record, I receive only 213 chars.
{code}
cur = con.cursor()
cur.execute('SELECT "field" from "table" where id=?', [id])
for m in cur.itermap():
print m["field"]
{code}
With kinterbasdb this works fine
|
I have table with field
"field" "Text" /* "Text" = VARCHAR(5000) */,
One record have text of about 2500 chars in this field.
If I select this record, I receive only 213 chars.
cur = con.cursor()
cur.execute('SELECT "field" from "table" where id=?', [id])
for m in cur.itermap():
print m["field"]
With kinterbasdb this works fine
|
elif vartype == SQL_VARYING:
size = bytes_to_uint(sqlvar.sqldata[:1]) # ******************************
#value = ctypes.string_at(sqlvar.sqldata[2],2+size)
### Todo: verify handling of P version differences
if PYTHON_MAJOR_VER == 3:
value = bytes(sqlvar.sqldata[2:2 + size])
else:
value = str(sqlvar.sqldata[2:2 + size])
if ((self.__charset or PYTHON_MAJOR_VER == 3)
and sqlvar.sqlsubtype != 1): # non OCTETS
value = b2u(value,self.__python_charset)
replace selected string with
size = bytes_to_uint(sqlvar.sqldata[:2])