Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / November 2005

Tip: Looking for answers? Try searching our database.

Memo field add/update failure

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
petejha@blueyonder.co.uk - 11 Nov 2005 22:40 GMT
I am working on a new website using asp with an Access database. I have
a problem with a Memo field when adding/updating - the SQL fails with

Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
[Microsoft][ODBC Microsoft Access Driver]Invalid precision value

when I try to add or update more than 255 characters. If I remove the
extra characters, the add/update works fine.

I tried an experiment where I created a record directly in the table
with about 700 characters in the Memo field. I shipped this database to
the website and found I could retrieve and display the data with no
problem but I could not save that same data without removing the extra
characters.

I have trawled through lots of user group entries and found lots of
instances of truncating Memo fields but in every case that I've seen
the solution has been to remove GROUP BY, DISTINCT, or a similar
condition on the query. My SQL is straightforward and I am using a
preset query (stored procedure) in Access like this (there are actually
lots of fields but I have left most out for ease of reading):

connString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" &
Server.MapPath("mydb.mdb")
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open connString
conn.qUpdTable, mymemo, myinput

where 'qUpdTable' is the UPDATE statement, ''mymemo' is the Memo field
and 'myinput' is the input parameter. The UPDATE statement in Access
looks like this :

UPDATE Mytable SET MyMemoFld = [mymemo]
WHERE MytableID=[myinput];

Can anyone shed any light on why this should fail and how I can resolve
the problem?

Thanks in hopeful anticipation.

PJ.
Bob Miller - 14 Nov 2005 14:30 GMT
Did you check your table's field size?
petejha@blueyonder.co.uk Wrote:
> I am working on a new website using asp with an Access database. I have
> a problem with a Memo field when adding/updating - the SQL fails with
[quoted text clipped - 40 lines]
>
> PJ

--
Bob Miller
petejha@blueyonder.co.uk - 14 Nov 2005 21:45 GMT
There is no size for a Memo field, unlike a Text field - you don't get
a Size option to set. It just takes any number of characters up to
65,000 or so.

Thanks for the suggestion though.

PJ.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.