Itabyte®-Erro no Delphi2006 .NET !!! Pessoal to usando o Delphi2006 com .NET to achando 1000 , só que no momento to enrroscado na seguinte coisa, tenho a seguinte procedure: procedure TWebForm1.SalvaRegistro; begin FBConnection1.Open; try if file1.PostedFile.FileName <> '' then begin with FBCommand1 do begin if request.QueryString['ID_PRODUTO'] <> nil then Parameters[0].Value := Request.QueryString['ID_PRODUTO'] else Parameters[0].Value := &Object(0); Parameters[1].Value := dpcategoria.SelectedValue; Parameters[2].Value := txtproduto.Text; Parameters[3].Value := txtpreco.Text; Parameters[4].Value := txtdescricao.Text; Parameters[5].Value := SalvarFiguraDisco; ExecuteNonQuery; Response.Write('<script>JavaScript:alert('+ '''Cadastro efetuado com sucesso !!!'');'+ '</script>'); end; end else Response.Write('<script>JavaScript:alert('+ '''Escolha um arquivo para salvar o registro !!!'');'+ '</script>'); finally FBConnection1.Close;
end; end; Como todos sabem essa procedure é para gravar um registro no banco , chamo ela em um botao chamado Salvar Dados : SalvaRegistro; Mais , qdo estou com a pagina do cadastro do produto aberta e clico no botao para salvar o registro o IE me da a seguinte mensagem de erro: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.] System.Web.UI.HtmlControls.HtmlInputFile.get_PostedFile() +6 cadastroprodutos.TWebForm1.SalvaRegistro() cadastroprodutos.TWebForm1.btnsalvar_Click(Object sender, EventArgs e) System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain() +1292 Alguem ja viu isso ?? e saber resolver esse problema??? JESUS TE AMA !!! -------------------------------------------------------------------------------- Itabyte Tecnologia®-www.itabyte.com MarcioCC® Analista/Programador - Delphi MSN : [EMAIL PROTECTED] SKYPE : itabytetec Fone : 15-3524-1946 [As partes desta mensagem que não continham texto foram removidas] -- <<<<< FAVOR REMOVER ESTA PARTE AO RESPONDER ESTA MENSAGEM >>>>> <*> Para ver as mensagens antigas, acesse: http://br.groups.yahoo.com/group/delphi-br/messages <*> Para falar com o moderador, envie um e-mail para: [EMAIL PROTECTED] Links do Yahoo! Grupos <*> Para visitar o site do seu grupo na web, acesse: http://br.groups.yahoo.com/group/delphi-br/ <*> Para sair deste grupo, envie um e-mail para: [EMAIL PROTECTED] <*> O uso que você faz do Yahoo! Grupos está sujeito aos: http://br.yahoo.com/info/utos.html