... ( any file ) to a VarBinary(max) field in your table ... this is my code .. note this line is the key to the code oRsCh:Fields("notes"):AppendChunk( VTArrayWrapper():New( 17, cBUFFER ) ) //------------------------------Static Func _Doit( oRsTrav, oRsCh, cPROJECTEID, cPath,oDLg )LOCAL ...
... take note .. I do not allow files to be stored that are just too big. in Sql you have to use the VarBinaryMax field .. Note the key here is the AppendChunk method .. oRsCh:Fields("notes"):AppendChunk( VTArrayWrapper():New( 17, cBUFFER ) ) //------------------------------Static Func ...
... thumbnails imported into a Sql table. From my experience, the only way to store any file in a Sql table is to import the picture as a binary file (AppendChunk) into a ( sql server ) VarBinary(Max) or equivalent. The data is stored as bytes and have to be re-assembled back in it original form ( ...
... un archivo válido. Pero no sé como comprobarlo, estoy perdido. Intenté usar un ejemplo que hallé aqui en el foro: oRsfoto:Fields("foto"):AppendChunk( VTArrayWrapper():New( 17, cBUFFER ) ) // cBUFFER contiene bytes leidos desde un fichero de imagen Pero tuve problemas con la función VTArrayWrapper, ...
... oCn:Execute( "SET SESSION max_allowed_packet=16777216;" ) // 16MB. I am sure you won't be needing larger sizes than this. Note: oField:AppendChunk() is required in case of (a) very huge data that can not be handled in one single update/insret and/or (2) where the network or server's ...
... set server parameters. Please see about "max_allowed_packet" parameter in MySql documentation. Otherwise you should use oRs:Fields( n ):AppendChunk( cPart ) repeatedly
... must be VarBinary (max ) or equivalent. Here is the code that has worked for me ( may be xHarbor specific using VTArrayWrapper() ) .. it uses the AppendChunk() method to import any binary file, .pdf, .docx, xls, etc.. I am sure Rao could simplify this code into a wrapper. Rick Lipkin ps .. I did ...
Here you have the Binary file import .. I would suspect it is specific to xHarbour. oRsCh:Fields("charter"):AppendChunk( VTArrayWrapper():New( 17, cBUFFER ) ) Rick //------------------------------Static Func _Doit( oRsProj, oRsCh, cPROJECTEID, cType )LOCAL cFILENAME, ...
Hello Rick, Already many thanks for the effort. oRsCh seems to be an instance of an ado object. I asume it is the free AdoRDD. So I can not use appendchunk in my SQL rdd. I did not find an equivalent in the short manual. So I think I have to build a new environment based on AdoRDD. I saw you have ...
... the same problem as you .. I needed to be able to store any document in a database .. I am using just plain ADO .. not any commercial library .. AppendChunk, GetCHunk are well documented ADO methods on MSDN .. oRsCh:Fields("charter"):AppendChunk( VTArrayWrapper():New( ...
Hello Rick, oRsCh:Fields("charter"):AppendChunk( VTArrayWrapper():New( 17, cBUFFER ) ) Indeed this line could contain the solution. I wonder if VTArrayWrapper is written in xHarbourcode and available. ...
... the following code for MS Sql server .. using a VarBinary(max ) "charter" field in the table : This uses (x)Harbour ADO methods .. notice the AppendChunk method .. Rick Lipkin // open file // nHANDLE := FOpen( cFILE ) IF FERROR() <> 0 SAYING := "Error reading ...