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

How to insert General and Text field at the same time? 1

Status
Not open for further replies.

shelbytll

Programmer
Dec 7, 2001
135
SG
I have a General and text field in a table.
How do I insert both at a time?
I only know Append General tablename.fieldname from &var
But how do I append the general field and the text field at the same time? I am a clever newbie...[peace]
 
shelbytll:

You have to perform it in two steps.

First:

* The text field
insert into testgeneral (imagename) values ("C:\My Documents\CropCircles\EastField2002sb[1].jpg")

then:

* The general field
append general testgeneral.imagefile from "C:\My Documents\CropCircles\EastField2002sb[1].jpg" link

* with or without the link argument
* also the table prefix really doesn't do anything
* other than self document

Note: You'll need to have the table selected for append general to work. Otherwise fox will throw an error at best or append to the wrong table at worst(if another table has a general field with the same name and is currently selected)


Darrell
'We all must do the hard bits so when we get bit we know where to bite' :)
 
shelbytll

There are numerous threads in this forum on the use of general fields for the storage and retrieval of image files, thread184-347696 being just one - note the comment about the use of 'link'.

If you do need to store an image in a table, the code for a memo field would be :-

* The memo field
append memo testgeneral.imagefile from "C:\My Documents\CropCircles\EastField2002sb[1].jpg" OVERWRITE
HTH

Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top