Ir para conteúdo
  • Cadastre-se

dani_bladt

Membros
  • Total de ítens

    8
  • Registro em

  • Última visita

dani_bladt's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputação

  1. Eh, eu tbm usei o strtodate / strtodatetime ... mas o erro prossegue... O erro chega aqui agora try ExecSQL; E esse erro continua project tcc.exe raised exception clas EOleException with message 'Conversion failed when converting date/or time from character string'. Process stopped. Use step or run to continue.
  2. Preencho todos os campos, clico em inserir e da o seguinte erro project tcc.exe raised exception clas EOleException with message 'Conversion failed when converting date/or time from character string'. Process stopped. Use step or run to continue. Clico em ok e vai pro ExecSql; e Application.Run; da dpr É gente, eu acho que vou precisar de umas aulas só de erros rs
  3. Eh fiz, isso, tirei o COLOTES do INSERT, esse erro não dá mais, agora da outro KK
  4. AsFloat não dá, dá erro... "Undeclared identifier: 'AsFloat'
  5. Não sei se tem que colocar um Open, vou tentar... :s Delphi 7 e SQL Server 2008... A conexao com o banco está tudo ok... Não entendo pq da essa montão de erro x.x
  6. Fiz essa mudança... Executei, preenchi os campos, agora da outro erro: Project tcc.exe raised exception class EOleException with message 'Cannot insert explicit value for identify column in table 'Lotes' when IDENTITY_INSERT is set to OFF'. Use Step or Run to continue. E dps desse erro ele cria uma linha azul no ExecSQL;
  7. Certo, mas aí nas linhas de código não teria que alterar alguma coisa? Pelo fato de eu ter mudado para Float? Mudei aqui para Float no banco de dados... Mas parece estar dando erro do mesmo jeito... x.x Quando clico no botão ok, ele vai direto para a DPR, no Application.Run;
  8. Bom Dia pessoal do Forum! Estou no processo do meu tcc e empaquei numa parte... É um Software para Granjas e estou na parte de cadastro, tenho alguns botões de novo, excluir, incluir e editar! Alguns campos para preencher e depois de preenchido quando for clicar no botão incluir é para incluir no DBGrid! Só que quando clico no Incluir ele dá um erro! Project tcc.exe raised exception class EConvertError with message ''' is not a valid integer value'. Process stopped. Use Step or Run to Continue. Após isso, quando clico no botão ok, uma linha azul vai para o dpr e marca a linha do Application.Run No banco de dados está as seguintes informações desse cadastro de Lotes: CODLOTES - INTEGER LOTE - NCHAR(80) LINHAGEM - NCHAR(20) NUMERO - INTEGER DATAALOJA - DATE INICIOSEM - DATE SEXO - CHAR(10) TOTALFEM - INTEGER PRECOFEM - INTEGER TOTALMAC - INTEGER PRECOMACH - INTEGER TIPORACAO - NCHAR(20) Vou postar também o código que está dentro do botão incluir: var sSql : String; begin sSql := 'INSERT INTO LOTES' + ' (CODLOTES, LOTE, LINHAGEM, NUMERO, DATAALOJAMENTO, INICIOSEMANA,SEXO, TOTALFEMEA, PRECOFEMEA, TOTALMACHO, PRECOMACHO, TIPORACAO)' + 'VALUES (:CODLOTES, :LOTE, :LINHAGEM, :NUMERO, :DATAALOJAMENTO, :INICIOSEMANA, :SEXO, :TOTALFEMEA, :PRECOFEMEA, :TOTALMACHO, :PRECOMACHO, :TIPORACAO) '; with ADOQueryL do begin Close; //Fecha a conexão Sql.Clear; //Limpa a query Sql.Add(sSql); Parameters.ParamByName('CODLOTES').Value := StrToInt(L_CODIGO.Text); Parameters.ParamByName('LOTE').Value := quotedstr(L_LOTE.Text); Parameters.ParamByName('LINHAGEM').Value := quotedstr(L_LINHAGEM.Text); Parameters.ParamByName('NUMERO').Value := StrToInt(L_NUMERO.Text); Parameters.ParamByName('DATAALOJAMENTO').Value := quotedstr(L_DATAALOJ.Text); Parameters.ParamByName('INICIOSEMANA').Value := quotedstr(L_INICIOSEM.Text); Parameters.ParamByName('SEXO').Value := quotedstr(L_SEXO.Text); Parameters.ParamByName('TOTALFEMEA').Value := L_TOTALFEMEA.Value; Parameters.ParamByName('PRECOFEMEA').Value := L_PRECOFEMEA.Value; Parameters.ParamByName('TOTALMACHO').Value := L_TOTALMACHO.Value; Parameters.ParamByName('PRECOMACHO').Value := L_PRECOMACHO.Value; Parameters.ParamByName('TIPORACAO').Value := quotedstr(L_TIPORACAO.Text); acaoNovo.enabled := True; acaoEditar.Enabled := True; acaoIncluir.Enabled := false; acaoExcluir.Enabled := True; try ExecSQL; except On E:Exception do begin ShowMessage('Erro na atualização da base de dados. Erro: ' + E.Message); end; end;//try except end; //with ADOQueryL end; Espero que possam me ajudar de alguma forma :/ Já não sei mais onde recorrer! E falta apenas 1 mes para a entrega x.x Obrigada.
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.