Como le hago para visulizar un datos LONG RAW, que generalmente guarda objetos como archivos, en asp,???
Intente de forma normal en una consulta y no me arrojo nada¡¡¡
quin me podra ayudar ???

| |||
Como le hago para visulizar un datos LONG RAW Que onda chavos ¡¡¡ una para la Araña ¡¡¡ Como le hago para visulizar un datos LONG RAW, que generalmente guarda objetos como archivos, en asp,??? Intente de forma normal en una consulta y no me arrojo nada¡¡¡ quin me podra ayudar ??? ![]()
__________________ ________________ ISC. Alejandro Zapata Hernandez |
| |||
|
| |||
No tengo ahorita toda la información. Pero si es que lo que quieres es devolver un archivo de la base de datos. Entonces busca cambiar el ContentType de tu respuesta al que corresponde para el tipo de archivo. Luego mandas todo el contenido, asegurandote que no vaya ningun dato extra, por que entonces el archivo estara dañado. Jpeg´s = Image/jpg Gifs = Image/gif HTML = txt/html texto = txt/txt .exe = Application/Executable .zip = Application/Zip Esto lo puedes ver en el registro del Sistema (regedit.exe), HKEY_CLASES_ROOT, ahi estan enlistadas todas las extensiones, con el detalle.
__________________ José Luis Chávez del Cid Systems Developer Specialist ACS Inc./Xerox Guatemala |
| |||
Este es mi codigo ¡¡¡¡ %@ LANGUAGE="VBSCRIPT" %> <% 'Clear existing HTTP header information. Response.Expires = 0 Response.Buffer = TRUE Response.Clear 'Set the HTTP header to an image type, if you want to display 'a jpg you need to use the "image/jpeg" content type. Response.ContentType = "application/pdf" Dim strTemp Set oConn = Server.CreateObject("ADODB.Connection") 'You need to change this line to reflect your DSN, UID 'and PWD. oConn.Open "DSN=digcont;UID=sidcon1;PWD=sidcon1;" 'Change this line to use your table that contains a raw or 'long raw field. In this case, ID is the primary key of the 'IMAGE table and IMG is the RAW or LONG RAW data column. sSQL = "Select K_FIANZA, FOTO from SID_IMGFIANZAS where K_FIANZA = 48" Set oRS = Server.CreateObject("ADODB.Recordset") oRS.Source = sSQL oRS.ActiveConnection = oConn 'The cursor type does not seem to matter. A keyset cursor was used 'with success for this article; however, you will not be able to 'scroll with it because the content type of this page is set for '"image/gif". oRS.Open strtemp = oRS("FOTO") Response.BinaryWrite(strTemp) Response.End oRS.Close Set oRS = nothing oConn.Close Set oConn = nothing %> Pero me manda el siguiente mensaje ¡¡¡ Tipo de error: objeto Response, ASP 0106 (0x80020005) Se encontró un tipo de datos sin especificar. /CID2000/index2.asp, line 38 Que pasa si claramente el espcifico que es un archivo pdf el cual quiero cosultar ????
__________________ ________________ ISC. Alejandro Zapata Hernandez |
| |||
El error del script esta en: strtemp = oRS("FOTO") Response.BinaryWrite(strTemp) cambialo por strtemp = oRS("FOTO") Response.BinaryWrite(strtemp ) ;) y nos cuentas com ote va.
__________________ José Luis Chávez del Cid Systems Developer Specialist ACS Inc./Xerox Guatemala |