>*------------------------------------------------------------ >Function SaveImage( l_ImagePath ) >*------------------------------------------------------------ > > ---l_ImagePath = 'textFile.txt' use a file > 170 MB > > lcName = JUSTFNAME(l_ImagePath) > lcType = JUSTEXT(l_ImagePath) > > lcImage= FILETOSTR( l_ImagePath ) > > lcSqlCmd = [exec dbo.sproc_SaveImage '] + lcName + [','] + ; > lcType + [', ?lcImage, ] > > > RetVal = SQLEXEC(this.ConNo, lcSqlCmd ,'tempFL') > IF RetVal < 0 > > private laError > =AERROR(laError) > > this.RetMsg = laError(2) --"Memory Allocation Failure" > endif > >ENDFUNC >To use varbinary(max) did you try STRCONV(filetostr(l_ImagePath),13) && or 15 (not sure which one you need to try here).