Ver Mensaje Individual
  #1  
Antiguo 25-07-2007
maru1981 maru1981 is offline
Miembro
 
Registrado: jul 2007
Posts: 22
Reputación: 0
maru1981 Va por buen camino
Exclamation como insertar en tablas SQL SERVER

hola saben soy principiante en delphi necesito saber como programar un boton de guardar mi tabla se llama salario mis datos se llaman nivel,salario ya hice mi conexion con la base de datos necesito saber que otros objetos necesito para poder guardar en esa tabla mi base de datos es en SQL SERVER mis edit.tex estan en un formulario sobre un panel y mi conexion con la BD se supone que fue exitosa...

asi escribi mi codigo

procedure TForm27.BitBtn1Click(Sender: TObject);
salario.nivel:=edit1.text;
salario.salario:=edit1.text;
begin
Form27.salario.insert;
Form27.salario.Fieldbyname('nivel').AsInteger:=Edit1.Text;
Form27.salario.Fieldbyname('salario').AsInteger:=Edit2.Text;
Form27.salario.Post;
end.

y es este es el error que me mando

[Error] Unit27.pas(53): Unknown directive: 'salario'
[Error] Unit27.pas(57): Undeclared identifier: 'salario'
[Error] Unit27.pas(57): '(' expected but ';' found
[Error] Unit27.pas(58): Undeclared identifier: 'salario'
[Error] Unit27.pas(59): Missing operator or semicolon
[Error] Unit27.pas(60): Undeclared identifier: 'salario'
[Error] Unit27.pas(61): ';' expected but '.' found
[Error] Unit27.pas(63): Declaration expected but end of file found
[Fatal Error] Unit2.pas(6): Could not compile used unit 'Unit27.pas'

gracias de antemano por su ayuda...
Responder Con Cita