If the html is pure text, there is no reason they won't store as varchar.
If it contains any graphics, then the html AND all the graphics for it
should be encapsulated in a Zip file and stored as VarBit.
This business here: SET VAR vdocimage = ('['''+.vdocfilename+''']') is only
setting vdocimage to a string of the filepathname enclosed in brackets, not
your html.
That is not going to insert the html text into the table.
Change the PageHTML Column to VarChar datatype.
Change vdocImage to VarChar dataType
Then:
CLEAR ALL VAR
SET VAR vdocfilename TEXT = NULL
SET VAR vdocimage VARCHAR = NULL
SET VAR vpageid INTEGER = NULL
SET VAR vpagename TEXT = NULL
SET VAR vpageprojectno = NULL
SET VAR vcmd TEXT = NULL
LABEL startmain
CHOOSE vdocfilename FROM #LFILES IN *.* +
AT CENTER CENTER TITLE 'Documents' CAPTION 'Pick Documents...' LINES 20 +
FORMATTED
SET VAR vcmd TEXT = ('set var vDocImage = [''' + .vdocfilename + ''']')
&vcmd
INSERT INTO htmlpage (pagename,pageprojectno,pagehtml) +
VALUES (.vpagename,.vpageprojectno,.vdocimage)
EDIT USING htmlpage WHERE pageid = .vpageid
RETURN
----- Original Message -----
From: "OmaYahoo" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Sunday, May 10, 2009 6:27 PM
Subject: [RBASE-L] - Inserting a text file into a note field
OK,
I'm having a little issue! Can any help me open my eyes! Can I do this
using Note as the DATATYPE?
I've got a rmd file that insert binary files into long varbit and large
text
file into long varchar columns.
That works fine I store drawing and text specification files(also a
different application)!
But this application has very small html files and
the external web access editor to the database does not like varchar but
it
does like note datatype.
(That's another issue for another day!)
I'm trying to insert small html files into a table.
Have to use note for the column definition!
I'm getting this error message when the insert fires!
-ERROR- Column PageHTML must be a valid Note. ( 122)
Here this the rmd file!
CLEAR ALL VAR
SET VAR vdocfilename TEXT = NULL
SET VAR vdocimage NOTE = NULL
SET VAR vpageid INTEGER = NULL
SET VAR vpagename TEXT = NULL
SET VAR vpageprojectno = NULL
LABEL startmain
CHOOSE vdocfilename FROM #LFILES IN *.* +
AT CENTER CENTER TITLE 'Documents' CAPTION 'Pick Documents...' LINES 20 +
FORMATTED
SET VAR vdocimage = ('['''+.vdocfilename+''']')
INSERT INTO htmlpage (PageName,PageProjectNo,PageHTML) +
VALUES (.vpagename,.vpageprojectno,&vdocimage)
EDIT USING htmlpage WHERE pageid = .vpageid
Here is the table definition!
Table: HTMLPage No Lock(s)
Descr: HTML Page
No. Column Name Attributes
--- ------------------
------------------------------------------------------
1 PageID Type : INTEGER AUTONUMBER
2 PageName Type : TEXT 35
3 PageProjectNo Type : TEXT 25
4 PageHTML Type : NOTE
Current number of rows: 5
Any suggestions would be appreciated!
Best Regards,
Oma Cox
O.C. Services Inc.
P.O. Box 5485
Brandon, MS 39047
662.820.7599
601.992.6785
www.ocservicesinc.com
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================