I'm trying to upload files to a SQL Server database with ObjectPAL but the binary data not being stored in the SQL Server database but in with Paradox table this code works fine. I think that MS SQL is not recognizing the data for some reason.
objectPal variable is binary and MSSQL field is varbinary(MAX)
............
fileDataBinary ;Save file data
endVar
.............
if fileData.readFromFile(selectedFile) then
..........
TC_Attachments.edit()
TC_Attachments.insertRecord()
TC_Attachments.Social_Security_No = "AXVD20"
TC_Attachments.File_Name_Native= fileName
TC_Attachments.File_Size_Native = fileData.size() ;Store size in bytes
TC_Attachments.File_Attachment_Native = fileData ;Store data in binary
TC_Attachments.Upload_Date = datetime()
TC_Attachments.endEdit()