Hi,
This works ok with the addition of a line to check for embedded
apostrophes:
put replace(myText,"'","''") into myText
However I now have a another weird problem, I have a field that
represents a file path, in this case the path is:
/Users/Dave/Music/iTunes/iTunes Music/Blank & Jones/Addicted To
Trance (Disc 1)/11 DJs, Fans And Freaks.mp3
However a "if there is a file" fails on this path. When I look I
can't see the & in the file name. I'm guessing it's something to
do with UTF16 vs UTF8 or something, but I'm not sure how to resolve
it. The database I am writing is set to UTF8 which AFAIK is the only
option for SQLite.
Any ideas what how to overcome this problem?
Thanks a lot for all your help
All the Best
Dave
On 1 Nov 2007, at 14:41, Robert Eppich wrote:
Hi Dave,
I am no pro at SQL, (just started 3 weeks ago with MS SQL Server),
but it looks to me that your values are using quotation marks
instead of apostrophes. Try something simple like the following:
INSERT INTO MusicBase (AlbumName,AlbumRating) VALUES ('FINALLY', '0')
hope this works for you.
Robert Eppich
On Nov 1, 2007, at 12:12 AM, dave at looktowindward wrote:
I am also getting an [unrecognized token: "") "] error, in this case
this is the string I pass in:
INSERT INTO MusicBase
(AlbumName,AlbumRating,AlbumRatingKind,ArtistName,BitRate,BPM,DateAdd
ed,
Duration,FileLocation,FileSizeBytes,Genre,ModDate,PlayedCount,PlayedD
ate
,SampleRate,TrackName,TrackRating,TrackRatingKind,TrackSkippedCount,T
rac
kSkippedDate,UnplayedFlag) VALUES ("Finally","0","computed","Ce Ce
Peniston","160","0","2005-07-30T16:07:37Z","250174","file://
localhost/
Users/Dave/Music/iTunes/iTunes Music/Ce Ce Peniston/Finally/02
Finally (7_Choice
Mix).mp3","5005741","Rock","2005-06-08T17:49:38Z","0","missing
value","44100","Finally (7"Choice Mix)","0","computed","0","missing
value","***NULL***")
All the values look ok to me, why should it fail?
All the Best
Dave
Hi,
I am getting an invalid token error from revExecuteSQL, when I look
at the data being inserted, it contains a ":" character following by
a number (a date field in the form DD:MM:YY. How do I insert this
data?
Here is the code:
put "INSERT INTO " & theTableName & " (" & myTempKeyList & ") " & \
" VALUES (" & myValueList & ") " into mySQLCode
revExecuteSQL theDatabaseID,mySQLCode
put the result into myResult
if myResult <> empty then
if myResult is not an integer then
answer error "Error in UtilDBInsertRecord, revExecuteSQL:"
&& myResult
breakpoint
end if
end if
Thanks a lot
All the Best
Dave
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution