I’m having an issue saving images to the sql 2008, I get an The index 2 is out of range error, my table has 2 columns ndx INT and image VARBINARY(max)
below is the code I’m using, I have also attached the error code.
path = system.file.openFile()
if path != None:
bytes = system.file.readFileAsBytes(path)
system.db.runPrepUpdate(" INSERT INTO JDEPARTIMG (ndx,image) Values(10,Cast(? as varbinary(max))",(bytes))