Paramter Query with a memo field

G

Geof Wyght

Hello,
I tried to create a parameter query to append a record to
a table with a memo field, but Access 2000 didn't like
the "Memo" type:
Parameters prmLocation Text (70), prmDescription Memo;
INSERT INTO tblLocation ( LocationName, Description )
VALUES (prmLocation, prmDescription)

Does anyone know whether this can be done, or am I stuck
with Text (255)?
Thanks!
 
G

Geof Wyght

Thanks John. I Changed the Text data type to LongText.
Access did not complain about syntax. However, I ran the
query, copied 1239 characters into the parameter dialog
box and 255 characters were appended. When I opened the
query again in design mode the data type was Text again.
Geof.
 
K

Ken Snell [MVP]

I believe that ACCESS truncates any parameter at 255 characters -- likely
because of the limitation of 255 characters for criterion
matching/finding/sorting.

This could be done via code if a recordset is opened based on a query or
table, and then write the memo field's contents directly.
 
D

david epsom dot com dot au

We too had a problem with a Memo parameter in
Access 2000. It crashed for some data values
(null? empty string?). So I would advise against
using Memo as a parameter type in A2K.

(david)
 
G

Geof Wyght

Thanks, Ken. I was planning to execute the query from an
asp.net page via a command object. I'll try to feed the
query a long string, and if that doesn't work, I'll
abandon the concept of a stored procedure and just build
the query string inside the vb.net procedure. I suspect
though that since Access is changing the LongText type to
Text once I save the query, that my test won't work.
Geof Wyght
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top