Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memo Field Limited to 900 Characters

Status
Not open for further replies.

Promis

IS-IT--Management
Feb 19, 2003
6
0
0
US
Greetings,

I have a problem with a Memo field in Acces 2000. I am using VB.Net and excuting an SQL INSERT INTO statements to save the contents on a text box to the DB.

I have tried both ADO and ADO.Net but both neither will save the data. If I use a Left(txtBox.Text,900) the string is save. If I use Left(txtBox.Text,901) the field is null.

Anyone experienced this and what is the fix.

Thanks!
 
Promis: Make sure you don't have an apostrophie playing out here, you'll have to run a string replace if that is the case (.NET will break here). Otherwise, one would think all is ok - but then, I haven't had a 900 character string to deal with lately. Hard to say.
 
Isadore, Thanks.

However I don't have any apostrophies in the string. I even defined a string of 900 characters, all 'a's, and 900 it would except but 901 it wouldn't store in the Memo field. I also tried using a DataSet and setting directly using:

MyDS.Fields("Notes").Value = strMemo
MyDS.Update()

but still no luck.

So neither the INSERT INTO or the DataSet update would work with a string longer than 900 characters.

Promis
 
Promis: Interesting point here. Will have to do a bit research/reading to see if there is an insight into this. You might post at a couple of other .NET sites to see if you can get other input. I'll keep an eye open and if I run into anything will repost this thread.

It may be that the "Left" function stops at 900; but I presume that was just a check you made.

Currently I'm removed from my library where I have a few VB.NET books (work mostly with ASP.NET) so can't look into it. Good question though, because >900 characters would be needed in any decently sized Memo type string.

We'll have to repost the solution when we find it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top