Problem with revExecuteSQL - More
Robert Eppich
RobertEppich at epsi.bc.ca
Thu Nov 1 10:41:20 EDT 2007
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,DateAdde
> d,
> Duration,FileLocation,FileSizeBytes,Genre,ModDate,PlayedCount,PlayedDa
> te
> ,SampleRate,TrackName,TrackRating,TrackRatingKind,TrackSkippedCount,Tr
> ac
> 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
More information about the use-livecode
mailing list