Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

marcosbeltrami

Erro na inclusão no banco de dados

Recommended Posts

Olá pessoal, estou com um problema numa página de inclusão no banco de dados, está dando o seguinte erro:

 

Active Server Pages error 'ASP 0131' Disallowed Parent Path /administracao/receitas/gravar.asp, line 2 The Include file '../../includes/loader.asp' cannot contain '..' to indicate the parent directory.

Página incluir.asp:

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><html><head><title>Administração - Receitas do Gordinho</title><link href="../style.css" type="text/css" rel="stylesheet"><script language="javascript">var win = null;function NewWindow(mypage,myname,w,h,scroll){LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;TopPosition = (screen.height) ? (screen.height-h)/2 : 0;settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+''win = window.open(mypage,myname,settings)}</script></head><body leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" topmargin="0" scroll="AUTO" bgcolor="#FFFFFF"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr>	<td align="center">  <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">        <tr> 	 <td valign="top">    <table border="0" cellpadding="1" cellspacing="1" >                <tr>   	                   <td align="center" bgcolor="#FFFFFF">                     <table border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF">                      <tr>                                                  <td height="30" align="center"></td>      </tr>       <tr>                                                   <td align="center" class="pgTitleOrange">Receitas do Gordinho</td>      </tr>        <tr>                                                  <td height="15" align="center"></td>      </tr>        <tr>                                                  <td align="center" class="mdtextbold">Administrador, você está em Receitas</td>      </tr>                        <tr>                                                  <td height="15" align="center"></td>      </tr>         </table>      <table border="0" cellspacing="0" cellpadding="0">      <tr>     	 <td width="780" align="center"> 	      	 <table width="750" border="0" cellspacing="0" cellpadding="0">     	 <tr>        <td>        <table width="750" border="0" cellspacing="0" cellpadding="0">        <form action="gravar.asp" method="POST" enctype="multipart/form-data" name="form1">       	 <tr>       	 <td class="mdtextbold">Categoria:</td>       	 <td><select name="rec_categoria" id="rec_categoria" class="mdtext">           <option value="">Selecione</option>           <option value=""></option>           <option value="" class="mdtextorange">Receitas</option>           <option value="Acompanhamentos">Acompanhamentos</option>           <option value="Aves">Aves</option>           <option value="Baixo Colesterol">Baixo Colesterol</option>           <option value="Bebidas">Bebidas</option>           <option value="Bolos">Bolos</option>           <option value="Carnes">Carnes</option>           <option value="Condimentos">Condimentos</option>           <option value="Cremes">Cremes</option>           <option value="Diet">Diet</option>           <option value="Doces">Doces</option>           <option value="Ervas">Ervas</option>           <option value="Especiais">Especiais</option>           <option value="Especiarias">Especiarias</option>           <option value="Grãos">Grãos</option>           <option value="Lanches">Lanches</option>           <option value="Legumes">Legumes</option>           <option value="Light">Light</option>           <option value="Massas">Massas</option>           <option value="Microondas">Microondas</option>           <option value="Molhos">Molhos</option>           <option value="Pães">Pães</option>           <option value="Pastas">Pastas</option>           <option value="Patês">Patês</option>           <option value="Peixes">Peixes</option>           <option value="Purês">Purês</option>           <option value="Rápidas">Rápidas</option>           <option value="Saladas">Saladas</option>           <option value="Salgados">Salgados</option>           <option value="Sobremesas">Sobremesas</option>           <option value="Sopas">Sopas</option>           <option value="Temperos">Temperos</option>           <option value="Tortas">Tortas</option>           <option value="Vegetarianas">Vegetarianas</option>           <option value=""></option>           <option value="" class="mdtextorange">Internacional</option>           <option value="Alemã">Alemã</option>           <option value="Americana">Americana</option>           <option value="Árabe">Árabe</option>           <option value="Brasileira">Brasileira</option>           <option value="Chilena">Chilena</option>           <option value="Chinesa">Chinesa</option>           <option value="Egípcia">Egípcia</option>           <option value="Espanhola">Espanhola</option>           <option value="Filipinas">Filipinas</option>           <option value="Francesa">Francesa</option>           <option value="Grega">Grega</option>           <option value="Havaiana">Havaiana</option>           <option value="Hungara">Hungara</option>           <option value="Indiana">Indiana</option>           <option value="Indonêsa">Indonêsa</option>           <option value="Ingleza">Ingleza</option>           <option value="Italiana">Italiana</option>           <option value="Japoneza">Japoneza</option>           <option value="Judaica">Judaica</option>           <option value="Lituâna">Lituâna</option>           <option value="Marroquina">Marroquina</option>           <option value="Mexicana">Mexicana</option>           <option value="Norueguesa">Norueguesa</option>           <option value="Portuguesa">Portuguesa</option>           <option value="Russa">Russa</option>           <option value="Suiça">Suiça</option>           <option value="Tailandesa">Tailandesa</option>           <option value="Vietnamita">Vietnamita</option>           </select>       	 </td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Receita:</td>       	 <td><input name="rec_receita" type="text" class="mdtext" id="rec_receita" size="80" maxlength="255"></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td valign="top" class="mdtextbold">Introdução:</td>       	 <td><textarea name="rec_introducao" cols="100" rows="5" id="rec_introducao" class="mdtext"></textarea></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td valign="top" class="mdtextbold">Ingredientes:</td>       	 <td><textarea name="rec_ingredientes" cols="100" rows="10" id="rec_ingredientes" class="mdtext"></textarea></td>        </tr>        <tr>          <td height="15"></td>          <td class="mdtext"><a class="mdtext" href="../formatacao_html.asp" onclick="NewWindow(this.href,'name','450','300','yes');return false">Formatação HTML</a></td>          </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td valign="top" class="mdtextbold">Preparo:</td>       	 <td><textarea name="rec_preparo" cols="100" rows="10" id="rec_preparo" class="mdtext"></textarea></td>        </tr>        <tr>          <td height="15"></td>          <td class="mdtext"><a class="mdtext" href="../formatacao_html.asp" onclick="NewWindow(this.href,'name','450','300','yes');return false">Formatação HTML</a></td>          </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Rendimento:</td>       	 <td><input name="rec_rendimento" type="text" class="mdtext" id="rec_rendimento" size="40" maxlength="100"></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Tempo:</td>       	 <td><input name="rec_tempo" type="text" class="mdtext" id="rec_tempo" size="40" maxlength="100"></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Dificuldade:</td>       	 <td><input name="rec_dificuldade" type="text" class="mdtext" id="rec_dificuldade" size="40" maxlength="100"></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Calorias:</td>       	 <td><input name="rec_calorias" type="text" class="mdtext" id="rec_calorias" size="40" maxlength="100"></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Custo:</td>       	 <td><input name="rec_custo" type="text" class="mdtext" id="rec_custo" size="40" maxlength="50"></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Fonte:</td>       	 <td><input name="rec_fonte" type="text" class="mdtext" id="rec_fonte" size="40" maxlength="100"></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Imagem P:</td>          <td class="preto"><input type="file" name="cimg" class="mdtext"> <span class="mdtext">(A imagem tem que ter 100 pixels de largura)</span></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td class="mdtextbold">Imagem G:</td>       	 <td class="preto"><input type="file" name="nimg" class="mdtext"> <span class="mdtext">(A largura não pode passar de 250 pixels)</span></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td height="15"></td>       	 <td></td>        </tr>        <tr>       	 <td height="15" colspan="2"><div align="center">           <input name="acao" type="hidden" id="acao" value="gravar" class="preto">           <input type="submit" name="Submit" value="  INCLUIR  " class="mdtext">            </div></td>          </tr>        <tr>       	 <td colspan="2"><br><br><p align="center"><span class="mdtext"><a class="mdtext" href="listar.asp">Voltar para Receitas</a> | <a class="mdtext" href="../default.asp">Página Inicial</a></span><br><br></p></td>        </tr>        </form>        </table>                 </td>          </tr>        </table>	   	 </td>    </tr>    </table> 	 </td>  </tr></table></body></html>

Página gravar.asp:

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%><!--#include file="./../includes/loader.asp"--><%'Option ExplicitDim acao, rec_categoria, rec_receita, rec_introducao, rec_ingredientesDim rec_preparo, rec_rendimento, rec_tempoDim rec_dificuldade, rec_calorias, rec_custo, rec_fonteDim Conn, rsnot, rsnimg, rscimgDim nimg_id, cimg_id, rec_idDim rec_nimg_id, rec_cimg_idDim apaga_cimg, apaga_nimgDim SQLdel1, SQLdel2, SQLdel3'***** Recupera os dados do formulario incluir.aspSet load = new Loader	' calling initialize methodload.initialize	' File binary dataacao = load.getValue("acao")'***** APAGA REGISTRO *****if acao = "apagar" thenrec_id = load.getValue("rec_id")rec_nimg_id = load.getValue("rec_nimg_id")rec_cimg_id = load.getValue("rec_cimg_id")SQLdel1 = "DELETE FROM receitas WHERE rec_id = "& rec_id &";"SQLdel2 = "DELETE FROM receitas_nimg WHERE nimg_id ="& rec_nimg_id &";"SQLdel3 = "DELETE FROM receitas_cimg WHERE cimg_id ="& rec_cimg_id &";"'***** Abre conexao com o bd *****Set Conn = Server.CreateObject("ADODB.Connection")'Conn.CursorLocation = 2'Conn.Open "provider=microsoft.jet.oledb.4.0;data source=" & server.MapPath("../../database/receitas.mdb") & ""Conn.open application("conexao")Set rsapagar = Conn.execute(SQLdel1)Set rsapagar = nothing	if rec_nimg_id <> "" then  Set rsapagar = Conn.execute(SQLdel2)  Set rsapagar = nothing	end if	if rec_cimg_id <> "" then  Set rsapagar = Conn.execute(SQLdel3)  Set rsapagar = nothing	end ifSet Conn = Nothingresponse.redirect("listar.asp")end ifif acao = "alterar" thenrec_id = load.getValue("rec_id")rec_nimg_id = load.getValue("rec_nimg_id")rec_cimg_id = load.getValue("rec_cimg_id")apaga_cimg = load.getValue("apaga_cimg")apaga_nimg = load.getValue("apaga_nimg")end ifrec_categoria = replace(load.getValue("rec_categoria"),"'","''")rec_receita = replace(load.getValue("rec_receita"),"'","''")rec_introducao = replace(load.getValue("rec_introducao"),"'","''")rec_ingredientes = replace(load.getValue("rec_ingredientes"),"'","''")rec_preparo = replace(load.getValue("rec_preparo"),"'","''")rec_rendimento = replace(load.getValue("rec_rendimento"),"'","''")rec_tempo = replace(load.getValue("rec_tempo"),"'","''")rec_dificuldade = replace(load.getValue("rec_dificuldade"),"'","''")rec_calorias = replace(load.getValue("rec_calorias"),"'","''")rec_custo = replace(load.getValue("rec_custo"),"'","''")rec_fonte = replace(load.getValue("rec_fonte"),"'","''")'***** Abre conexao com o bd *****Set Conn = Server.CreateObject("ADODB.Connection")'Conn.CursorLocation = 2'Conn.Open "provider=microsoft.jet.oledb.4.0;data source=" & server.MapPath("../../database/receitas.mdb") & ""Conn.open application("conexao")'***** Recupera dados da imagem da CIMG *****cimg2 = load.getFileData("cimg")if cimg2 <> "" then' File binary data	Dim cimg_bin  cimg_bin = load.getFileData("cimg")' File name	Dim cimg_nome  cimg_nome = LCase(load.getFileName("cimg"))' File size	Dim cimg_tamanho  cimg_tamanho = load.getFileSize("cimg")' Content Type	Dim cimg_tipo  cimg_tipo = load.getContentType("cimg")' destroying load object'	Set load = Nothing'***** Cria o Recordset cimg *****if acao = "gravar" or (acao="alterar" and rec_cimg_id = "") thenSet rscimg = Server.CreateObject("ADODB.Recordset")with rscimg	.Source = "receitas_cimg"	.ActiveConnection = Conn	.CursorType = 1	.LockType = 2	.Open	.Addnew	.fields("cimg_nome") = cimg_nome	.fields("cimg_tamanho") = cimg_tamanho	.fields("cimg_bin").AppendChunk cimg_bin	.fields("cimg_tipo") = cimg_tipo	.Update	rec_cimg_id = .fields("cimg_id")end withSet rscimg = nothingend ifif acao = "alterar" and rec_cimg_id <>"" thenSet rscimg = Server.CreateObject("ADODB.Recordset")SQLcimg = "SELECT * FROM receitas_cimg WHERE cimg_id ="& rec_cimg_id &";"with rscimg	.Source = "receitas_cimg"	.ActiveConnection = Conn 	.CursorType = 1	.LockType = 2	.Open SQLcimg	.fields("cimg_nome") = cimg_nome	.fields("cimg_tamanho") = cimg_tamanho	.fields("cimg_bin").AppendChunk cimg_bin	.fields("cimg_tipo") = cimg_tipo	.Update	rec_cimg_id = .fields("cimg_id")end withSet rscimg = nothingend ifend if'***** Recupera dados da imagem da NIMG*****nimg2 = load.getFileData("nimg")if nimg2 <> "" then'	Set load = new Loader	' calling initialize method'  load.initialize	' File binary data	Dim nimg_bin  nimg_bin = load.getFileData("nimg")	' File name	Dim nimg_nome  nimg_nome = LCase(load.getFileName("nimg"))	' File size	Dim nimg_tamanho  nimg_tamanho = load.getFileSize("nimg")	' Content Type	Dim nimg_tipo  nimg_tipo = load.getContentType("nimg")'***** Cria o Recordset nimg *****if acao = "gravar" or (acao="alterar" and rec_nimg_id = "") thenSet rsnimg = Server.CreateObject("ADODB.Recordset")With rsnimg	.Source = "receitas_nimg"	.ActiveConnection = Conn	.CursorType = 1	.LockType = 2	.Open	.Addnew	.Fields("nimg_nome") = nimg_nome	.Fields("nimg_tamanho") = nimg_tamanho	.Fields("nimg_bin").AppendChunk nimg_bin	.Fields("nimg_tipo") = nimg_tipo	.Update	rec_nimg_id = .Fields("nimg_id")End WithSet rsnimg = nothingend ifif acao = "alterar" and rec_nimg_id <>"" thenSet rsnimg = Server.CreateObject("ADODB.Recordset")SQLnimg = "SELECT * FROM receitas_nimg WHERE nimg_id = "& rec_nimg_id &";"With rsnimg	.Source = "receitas_nimg"	.ActiveConnection = Conn	.CursorType = 1	.LockType = 2	.Open SQLnimg	.Fields("nimg_nome") = nimg_nome	.Fields("nimg_tamanho") = nimg_tamanho	.Fields("nimg_bin").AppendChunk nimg_bin	.Fields("nimg_tipo") = nimg_tipo	.Update	rec_nimg_id = .Fields("nimg_id")End Withrec_nimg_id = cint(rec_nimg_id)Set rsnimg = nothingend ifend if'***** Cria o Recordset *****if acao = "gravar" thenSet rsnot = Server.CreateObject("ADODB.Recordset")with rsnot	.Source = "receitas"	.ActiveConnection = Conn	.CursorType = 1	.LockType = 2	.Open	.Addnew	.fields("rec_categoria") = rec_categoria	.fields("rec_receita") = rec_receita	.fields("rec_introducao") = rec_introducao	.fields("rec_ingredientes") = rec_ingredientes	.fields("rec_preparo") = rec_preparo	.fields("rec_rendimento") = rec_rendimento	.fields("rec_tempo") = rec_tempo	.fields("rec_dificuldade") = rec_dificuldade	.fields("rec_calorias") = rec_calorias	.fields("rec_custo") = rec_custo	.fields("rec_fonte") = rec_fonte	.fields("rec_cimg_id") = rec_cimg_id	.fields("rec_nimg_id") = rec_nimg_id	.Updateend withSet rsnot = nothingend ifif acao = "alterar" thenSQLnot1 = "SELECT * FROM receitas WHERE rec_id = "& rec_id &";"Set rsnot = Server.CreateObject("ADODB.Recordset")with rsnot	.Source = "receitas"	.ActiveConnection = Conn	.CursorType = 1	.LockType = 2	.Open SQLnot1	.fields("rec_categoria") = rec_categoria	.fields("rec_receita") = rec_receita	.fields("rec_introducao") = rec_introducao	.fields("rec_ingredientes") = rec_ingredientes	.fields("rec_preparo") = rec_preparo	.fields("rec_rendimento") = rec_rendimento	.fields("rec_tempo") = rec_tempo	.fields("rec_dificuldade") = rec_dificuldade	.fields("rec_calorias") = rec_calorias	.fields("rec_custo") = rec_custo	.fields("rec_fonte") = rec_fonteend withif rec_cimg_id <> "" and apaga_cimg <> "sim" then	rsnot("rec_cimg_id") = rec_cimg_idend ifif rec_nimg_id <> ""  and apaga_nimg <>"sim"then 	rsnot("rec_nimg_id") = rec_nimg_idend ifif apaga_cimg = "sim" then	rsnot("rec_cimg_id") = nullend ifif apaga_nimg = "sim" then	rsnot("rec_nimg_id") = nullend if	rsnot.UpdateSet rsnot = nothing'***** Apaga registro em cimg *****if apaga_cimg = "sim" thenSQLdel2 = "DELETE FROM receitas_cimg WHERE cimg_id ="& rec_cimg_id &";"Set rsapagar = Conn.execute(SQLdel2)Set rsapagar = nothingend if'***** Apaga registro em nimg *****if apaga_nimg = "sim" thenSQLdel3 = "DELETE FROM receitas_nimg WHERE nimg_id ="& rec_nimg_id &";"Set rsapagar = Conn.execute(SQLdel3)Set rsapagar = nothingend ifend if'***** Fecha a conexao *****conn.closeset conn = nothingset load = nothing'****** redireciona para onde veio *****if acao = "gravar" then	RESPONSE.Redirect("incluir.asp")elseif acao = "alterar" then	RESPONSE.Redirect("listar.asp")end if%>

Página de loader.asp

 

<%  ' -- Loader.asp --  ' -- version 1.5  ' -- last updated 6/13/2002  '  ' Faisal Khan  ' faisal@stardeveloper.com  ' www.stardeveloper.com  ' Class for handling binary uploads    Class Loader    Private dict        Private Sub Class_Initialize      Set dict = Server.CreateObject("Scripting.Dictionary")    End Sub        Private Sub Class_Terminate      If IsObject(intDict) Then        intDict.RemoveAll        Set intDict = Nothing      End If      If IsObject(dict) Then        dict.RemoveAll        Set dict = Nothing      End If    End Sub    Public Property Get Count      Count = dict.Count    End Property    Public Sub Initialize      If Request.TotalBytes > 0 Then        Dim binData          binData = Request.BinaryRead(Request.TotalBytes)          getData binData      End If    End Sub        Public Function getFileData(name)      If dict.Exists(name) Then        getFileData = dict(name).Item("Value")        Else        getFileData = ""      End If    End Function    Public Function getValue(name)      Dim gv      If dict.Exists(name) Then        gv = CStr(dict(name).Item("Value"))                gv = Left(gv,Len(gv)-2)        getValue = gv      Else        getValue = ""      End If    End Function        Public Function saveToFile(name, path)      If dict.Exists(name) Then        Dim temp          temp = dict(name).Item("Value")        Dim fso          Set fso = Server.CreateObject("Scripting.FileSystemObject")        Dim file          Set file = fso.CreateTextFile(path)            For tPoint = 1 to LenB(temp)                file.Write Chr(AscB(MidB(temp,tPoint,1)))            Next            file.Close          saveToFile = True      Else          saveToFile = False      End If    End Function        Public Function getFileName(name)      If dict.Exists(name) Then        Dim temp, tempPos          temp = dict(name).Item("FileName")          tempPos = 1 + InStrRev(temp, "\")          getFileName = Mid(temp, tempPos)      Else        getFileName = ""      End If    End Function        Public Function getFilePath(name)      If dict.Exists(name) Then        Dim temp, tempPos          temp = dict(name).Item("FileName")          tempPos = InStrRev(temp, "\")          getFilePath = Mid(temp, 1, tempPos)      Else        getFilePath = ""      End If    End Function        Public Function getFilePathComplete(name)      If dict.Exists(name) Then        getFilePathComplete = dict(name).Item("FileName")      Else        getFilePathComplete = ""      End If    End Function    Public Function getFileSize(name)      If dict.Exists(name) Then        getFileSize = LenB(dict(name).Item("Value"))      Else        getFileSize = 0      End If    End Function    Public Function getFileSizeTranslated(name)      If dict.Exists(name) Then        temp = 1 + LenB(dict(name).Item("Value"))          If Len(temp) <= 3 Then            getFileSizeTranslated = temp & " bytes"          ElseIf Len(temp) > 6 Then            temp = FormatNumber(((temp / 1024) / 1024), 2)            getFileSizeTranslated = temp & " megabytes"            Else            temp = FormatNumber((temp / 1024), 2)            getFileSizeTranslated = temp & " kilobytes"          End If      Else        getFileSizeTranslated = ""      End If    End Function        Public Function getContentType(name)      If dict.Exists(name) Then        getContentType = dict(name).Item("ContentType")      Else        getContentType = ""      End If    End Function  Private Sub getData(rawData)    Dim separator       separator = MidB(rawData, 1, InstrB(1, rawData, ChrB(13)) - 1)    Dim lenSeparator      lenSeparator = LenB(separator)    Dim currentPos      currentPos = 1    Dim inStrByte      inStrByte = 1    Dim value, mValue    Dim tempValue      tempValue = ""    While inStrByte > 0      inStrByte = InStrB(currentPos, rawData, separator)      mValue = inStrByte - currentPos      If mValue > 1 Then        value = MidB(rawData, currentPos, mValue)        Dim begPos, endPos, midValue, nValue        Dim intDict          Set intDict = Server.CreateObject("Scripting.Dictionary")              begPos = 1 + InStrB(1, value, ChrB(34))          endPos = InStrB(begPos + 1, value, ChrB(34))          nValue = endPos        Dim nameN          nameN = MidB(value, begPos, endPos - begPos)        Dim nameValue, isValid          isValid = True                    If InStrB(1, value, stringToByte("Content-Type")) > 1 Then            begPos = 1 + InStrB(endPos + 1, value, ChrB(34))            endPos = InStrB(begPos + 1, value, ChrB(34))              If endPos = 0 Then              endPos = begPos + 1              isValid = False            End If                        midValue = MidB(value, begPos, endPos - begPos)              intDict.Add "FileName", trim(byteToString(midValue))                            begPos = 14 + InStrB(endPos + 1, value, stringToByte("Content-Type:"))            endPos = InStrB(begPos, value, ChrB(13))                        midValue = MidB(value, begPos, endPos - begPos)              intDict.Add "ContentType", trim(byteToString(midValue))                        begPos = endPos + 4            endPos = LenB(value)                        nameValue = MidB(value, begPos, endPos - begPos)          Else            nameValue = trim(byteToString(MidB(value, nValue + 5)))          End If          If isValid = true Then            intDict.Add "Value", nameValue            intDict.Add "Name", nameN            dict.Add byteToString(nameN), intDict          End If      End If      currentPos = lenSeparator + inStrByte    Wend  End Sub    End Class  Private Function stringToByte(toConv)    Dim tempChar     For i = 1 to Len(toConv)       tempChar = Mid(toConv, i, 1)      stringToByte = stringToByte & chrB(AscB(tempChar))     Next  End Function  Private Function byteToString(toConv)    For i = 1 to LenB(toConv)      byteToString = byteToString & chr(AscB(MidB(toConv,i,1)))     Next  End Function%>

Compartilhar este post


Link para o post
Compartilhar em outros sites

poxa kra eu não vi todo seu codigo..

 

mais verifica:

-se o caminho para o banco esta correto.

-se a pasta ou o arquivo tem permisão de escrita

 

e caso não venha a ser esse o problema coloque só o pedaço do cogigo que esta errado...

 

esse monte de codigo num é legal http://forum.imasters.com.br/public/style_emoticons/default/ermm.gif

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.