Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to insert data in Paradox memo fields using SQL INSERT statements Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
28-Aug-02
Category
Database-SQL
Language
Delphi 3.x
Views
168
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas 

How to insert data in Paradox memo fields using SQL INSERT statements

Answer:

Assuming you are using at least Delphi 3, you need to represent the memo field in 
the SQL statement with a parameter.

INSERT INTO YourTable
(StrField, MemoField)
VALUES("AAA", : MemoParam)

The parameter would need to be the appropriate data type: the TParam.DataType 
property would need to be ftMemo. Then, before executing the SQL statement, provide 
the parameter with a value. How you provide the parameter value will vary depending 
on the form the source data is in.

If the source is a file, use the TParam.LoadFromFile method.
1   
2   Query1.ParamByName('MemoParam').LoadFromFile('c:\windows\network.txt');

If the source is a PChar (or equivalent) buffer, use direct assignment of the value 
to the parameter with the TParam.AsMemo property.
3   
4   Query1.ParamByName('MemoParam').AsMemo := Buffer;

If the source is in the form of a memory stream, use the TParam.LoadFromStream 
method.
5   
6   Query1.ParamByName('MemoParam').LoadFromStream(YourMemoryStream);


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC