![]() |
|
|
+ Search |
![]()
|
Jul 26th, 2001 18:18
Steve Herold, Sam Rosenberg, http://www.deja.com/usenet
In some cases, fields in an Access database will be truncated to 255
characters if accessed through ADO in your web page. This is a
Microsoft bug, and generally occurs if your SQL statement is too
complex (i.e. joins, multiple field returns, etc.)
For example:
select distinct i.ref, i.cdname, i.name, i.address, i.desc from appcd
cd, internet i, Datasource ds where cd.info_cat = 'cat1' and cd.cdname
= i.cdname and cd.cdname = ds.cdname order by i.name
You get the picture. Since this is a fairly complex SQL request, if
any of the fields requested was a Memo field, it would probably be
truncated.
A good workaround is to create a separate select statement for the Memo
fields only, with no joins:
select distinct i.ref, i.foo, i.bar, i.hum from cddoo cd, internet i,
Datasource ds where cd.gor = 'gor2' and cd. = i.cdname and cd.cdname =
ds.cdname order by i.name
set key = rs("ref")
select desc from internet where ref = "key"
Voila! No truncation.
I've been using memo fields in Access with ADO for months without any
problems. Some of this is documented in MS's Knowledge Base...but some
general rules should be
1. When doing an select alway place the memo field as the last field
in the list.
2. When doing an insert or update alway place the memo field as the
last field in the list.
Steve
© 1999-2004 Synop Pty Ltd