Problem with revExecuteSQL - More

Jim Ault JimAultWins at yahoo.com
Thu Nov 1 18:41:18 EDT 2007


Sorry about that, Dave,  I thought you were referring to the
INSERT command in Sql.  My mistake.

>> 
>> Basically, you are including control characters in the data you are
>> trying
>> to store, so Sql does not see those characters as *data*.
> 
> This has nothing to do with SQL, this is before the data is written,
> in fact I can insert the data ok. The problem is that some of the
> data has these weird characters. I am dealing with a "typical"
> MusicBase. From looking at the track that have these characters in
> then I'd say they came from a PC. I seem to remember somewhere now
> that said you have to do something to the data you wrote to ensure it
> will work on a Mac and PC. Does anyone remember??

The weird characters are the code for special characters in HTML and XML.
Browsers will decode these so the view of the page will see only the single
character represented.  Your program has to do the same thing as a browser,
parse the file paths to detect and convert these codes.

Eric Chatonet wrote a web page tag cleaning routine that did just this
(quite a while ago).  I cannot remember which stack it was, but this would
be a repeat loop where a whole set of these html entities will be converted.
Perhaps he will chime in and remind us.

Ken Ray has very good info on how to detect the platform and adjust the file
path to work in Rev.
http://sonsothunder.com/devres/revolution/revolution.htm
About half way down the page are some goodies.

Also, you should use the following:
if not(there is a file tPathFilename) then answer "ooops"

if not(there is a folder tFoldername) then answer "ooops"

Hope this is of more help.  I thought you were trying to move data in and
out of Sql.

Jim Ault
Las Vegas





More information about the use-livecode mailing list