I'm using the SQL below to add information about files in a filelistbox to a table. On certain groups of files it works great, but on others, it gives an error "Syntax Error in Insert Into Statement". Why would this work on some files and not others? They are all Mp3 I am dealing with. Any help is extremely appreciated. I don't understand this one. Here's the code:
VB Code:
'Use SQL to insert the information in the strings into the table SQL = "INSERT into " & table _ & "(FilePath, Filename, Filesize, Artist, Title) VALUES ('"_ & Replace(strFilepath, "'", "''")_ & "','" & Replace(strFileName, "'", "''") _ & "','" & Replace(strFileSize, "'", "''") _ & "','" & Replace(strArtist, "'", "''") & "','" _ & Replace(strTitle, "'", "''") & "')" Cnn.Execute (SQL) 'THE ERROR OCCURS ON THIS LINE Next




Reply With Quote