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!

insert into memo field

Status
Not open for further replies.

thegame8311

Technical User
Jan 6, 2012
133
US
I am trying to insert into a tables memo field but i get data type mismatch error, the data is coming from a text field, how do i do this?
 
There are too many unknowns about your general question to give you a definitive answer.

Regardless, in general....

A VFP MEMO field will accept Character type data only.

You can investigate this yourself using the VFP Trace window and the SET STEP ON command.

Insert the SET STEP ON command line into your code immediately before you are attempting the
REPLACE ThisMemo WITH ThisData

Then when the TRACE Window opens, you can investigate the type of data in the associated WATCH window.

If indeed the data you are attempting to insert (with the REPLACE) is character data, then the error message might be coming from some other problem - not associated with your 'insert into a tables memo field'

Again the SET STEP ON command can help you find out the problem.

Good Luck,
JRB-Bldr
 
AS you talk of Text field, is this MS SQL Server Text? Or what text field do you mean? VFP has several types of fields, which store their data into the fpt file, one of them is memo and has a variant binar5y memo, bu no matter what memo type, it can store string data.

Data Type mismatch really points to a wrong field type as the source. Debugging (eg via SET STEP ON or a breakpoint before the INSERT, UPDATE, APPEND, REPLACE or whatever you use to insert into the memo field should enable you to look at the real source data type.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top