I had a vbscript (macro) that inserted records into a IMAGE field in a SQL Server database,
pmspec = pmspec & vbCrLf & "Reason for Obsoletion: " & result & " By: " & Network_User & " - " & Now()
Set db = CreateObject("ADODB.Connection")
SET RSu = CREATEOBJECT("ADODB.RECORDSET")
SSQLUPD = "INSERT INTO PART_MFG_BINARY ([PART_ID],[TYPE],[BITS],[BITS_LENGTH]) VALUES ('" & ID & "'" & chr(44) & "'D'" & chr(44) & "'" & pmspec & "'" & chr(44) & Len(pmspec) & ")"
Set RSu = db.Execute(SSQLUPD)
Now our ERP vendor has upgraded all of their fields to DoubleByte (including the BITS (IMAGE) field above.
I can not figure out how to write the insert now to convert my text to DoubleByte.
I do know that I will need to change my Len(pmspec) to LenB(pmspec) (the table stores the length in bytes of the field into BITS_LENGTH)
Any help is greatly appreciated.