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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tmemo and Sql Insert

Status
Not open for further replies.

MattJenneson

Programmer
Sep 12, 2002
8
GB
Hi,

I've got a number of components (edit boxes etc.) and the contents are inserted into a sql table on the click of a button.

It insert only works if there are less than about 20 characters in one of my tMemo components. It all seems ok to me, it has a maxlength property of 0 etc.

Any ideas? i'm pretty new to delphi and this is the last (hopefully) bug i've got to work out of my app.

Thanks

Matt
 
hi

Do you get any error messages when > 20 chars or is it just truncating the data?

What database are you using and what's the field type (and size) set to in the table?

How are you passing the memo info to the sql statement? Do you have a code snippet to show us?

lou
 
Hi.

The problem is most likely you are exeeding the maxlenght of a database field.
* If you are using MSSQL, the string is automtically truncated.
* If you are using Sybase, you get a error message.

Or you have entered "illegal" text in a editable textbox like " or '.

As LucieLastic says: Do you have a code snippet to show us?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top