Access to large fields in ASP Appendchunk and getChunk

xiaoxiao2021-03-06  17

Appendchunk

Formsize = Request.totalbytes

'The size of the client to get the client formdata = request.binaryRead (Formsize)

'Transfer of data from customers into binary BNCRLF = Chrb (13) & chrb (10) Divider = Leftb (FormData, ClNG (INSTRB (FormData, Bncrlf)) - 1) Datastart = INSTRB (Formdata, Bncrlf & BnCrlf) 4DATAEND = INSTRB (DataStart 1, Formdata, Divider) -DataStartMyData = MIDB (Formdata, DataStart, DataEND)

'The top of the top is the binary data obtained.

SQL = "SELECT * FROM PIC ORDER BY ID DESC" SET RS = Server.createObject ("AdoDb.Recordset") RS.Open SQL, CONN, 3, 2RS.ADDNEWRS ("BIG"). Appendchunk MyData

'Add to the database rs.Update

Rs.close

Getchunk

SET REC = Server.createObject ("AdoDb.Recordset")

strsql = "SELECT IMG FROMAGES where ID =" & Trim (Request ("ID")))

Rec.open strsql, conngraph, 1, 1

Response.contentType = "image / *"

Response.binaryWrite

Rec ("img"). getchunk (7500000)

Rec.close

转载请注明原文地址:https://www.9cbs.com/read-41103.html

New Post(0)