GetDatabaseString text over 255 chars

Just starting out? Need help? Post your questions and find answers here.
mcsalsa
User
User
Posts: 17
Joined: Thu Sep 28, 2006 1:20 pm

GetDatabaseString text over 255 chars

Post by mcsalsa »

I have develop a small program that access an Access Database, in the table there are fields which are Memo Fields.

I store the field in a String variable, when retrieving the data out of the memo fields with texts of more than 255 chars the result that I'm having is that the variable contains only 255 chars the rest are truncated.

Do you have experienced this problem? If so what I'm doing wrong.

Thanks in advance.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Are you sure the string is not stored as truncated in the database?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

There is no hardcoded limit in GetDatabaseString() with v4, so it should handle any size.
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Access limits strings (text) to 255. Memo type fields allow longer strings.
Dare2 cut down to size
CSAUER
Enthusiast
Enthusiast
Posts: 188
Joined: Mon Oct 18, 2004 7:23 am
Location: Germany

Post by CSAUER »

That's right. Memo can have longer values, but they are not working correctly with GetDatabaseString(). I had some problems in the past (I used PB 3.94) and I solved the problem, by splitting the strings into a few 255 char fields and put them together into one string, after receiving data from database.
If you use MySQL, you would not have this problems, I think. So it sounds to me, that it has something to do with Access.
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

I dont have any problems with MEMO type and long strings. could you please give an example of your problem? It is maybe intressting for other DB app coders.
Tranquil
mcsalsa
User
User
Posts: 17
Joined: Thu Sep 28, 2006 1:20 pm

Post by mcsalsa »

Hello Tranquil,

Here you have an example:

2303,„ƒ„ƒ‚„ƒ„„‚„„„„ƒ„…„ƒ„…ƒƒ‚‡„‚ƒ……ƒƒƒ‚‚„ƒ‚‚‚ƒ
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

You're not dealing with any null characters in there, are you?
mcsalsa
User
User
Posts: 17
Joined: Thu Sep 28, 2006 1:20 pm

Post by mcsalsa »

Hello Xombie,

No, I'm not dealing with NULL chars. If is there any ascii 0, I escape to ascii 255
Tranquil
Addict
Addict
Posts: 952
Joined: Mon Apr 28, 2003 2:22 pm
Location: Europe

Post by Tranquil »

I will try this @work monday. thanks for fast answer.
Tranquil
Post Reply