[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

converiosn of memofields to alphafields7delphi

hi,
i have to copy one paradoxtable to another paradoxtable where the sourcetable has some memofields which i want to copy into alphafields in the dest.paradoxtable. i tried tbatchmove but didnt work, bmove stopped with the warning of data loss (data cut off etc.) how can i simply do this, thank u v.much
0
ugross
Asked:
ugross
  • 6
  • 4
  • 3
1 Solution
 
mhervaisCommented:
Dor BDE, the fields are automatically converted to memo even if the underlying database accepts string fields exceeding 256 chars.

1) if your data does not exceed 256 chars you can write a program that transfers from your source table to your dest table with corresponding reduced fields size,

2) if not you will have to stay on memo.

if interested in solution 1, I can whrite you quickly a squeleton for it

0
 
mhervaisCommented:
(not Dor -- For)
0
 
ugrossAuthor Commented:
yes thanks would be great when u could provide me one, great

0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
LischkeCommented:
Marc, great that you wanna help out, but please start with a comment instead of an answer :-)

ugross,

if there cannot be a data loss because the memo field length is less than the alpha field length then just ignore the warnings and set TBatchMove.AbortOnProblem to False to let the batch move go through.

Ciao, Mike
0
 
LischkeCommented:
Marc, congratulations for the points :-)

ugross, why did you accept the given answer? What did it contain you could use to solve your problem?

Ciao, Mike
0
 
ugrossAuthor Commented:
sorry lischke for that was a mistake
0
 
LischkeCommented:
Next time it becomes better...

Ciao, Mike
0
 
mhervaisCommented:
Mike, I completely agree that your answer is better than mine.

Howether, I had an answer and I proposed it as it was. Your answer being better than mine does not withdraw any quality from mine.

If I could give you the points back I would, and if Ugross wants a skeleton, I will still be glad to make it.

Howether, it is Ugross Responsability to accept or to reject answer.

regards, Marc





0
 
ugrossAuthor Commented:
hi again,
just tried the batchmove with the abort fields on false, but in the former memofields i get in the alpha fields now the following \rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}, what have i done wrong,
thx guys
0
 
mhervaisCommented:
Ugross It seems that your former fields are not just strings but are RTF encoded.

This comes probably because the application that store them took them in a component that kempt them in RTF Format. Typically like TRichEdit.

It means that you cannot change the format of your destination column unless, you find a way to strip off all the RTF indications from your text.

Of course TBatchMove is not ment to di this type of converstion, and if you would like to convert it, I think you will have to use a program, that reads your source table line by line, then find one way out decode this encoded field, and then write this line into the destination table.

I looked the richedit component to see if it could do the decoding, but at the moment the help did not encourage me.

I'll look again later, and let you know.

regards,

Marc

 
0
 
ugrossAuthor Commented:
hi mhervais thank u very much for your help, will have a look by myself, thank u i hope i find a way. merci beaucoup
0
 
mhervaisCommented:
Ugross It seems that your former fields are not just strings but are RTF encoded.

This comes probably because the application that store them took them in a component that kempt them in RTF Format. Typically like TRichEdit.

It means that you cannot change the format of your destination column unless, you find a way to strip off all the RTF indications from your text.

Of course TBatchMove is not ment to di this type of converstion, and if you would like to convert it, I think you will have to use a program, that reads your source table line by line, then find one way out decode this encoded field, and then write this line into the destination table.

I looked the richedit component to see if it could do the decoding, but at the moment the help did not encourage me.

I'll look again later, and let you know.

regards,

Marc

 
0
 
mhervaisCommented:
ok ugross. good luck
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 6
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now