Topic: [Help] Syntax or data type problem
Hello people. I am having a data type problem to do an insert into a table. Below I put the complete procedure to get the idea.
procedure frm_conf_ihs_OnShow (Sender: TObject; Action: string);
var
v_checkconf,v_titulo_left,v_lema_left,v_tiempo_actualizacion_datos_ds: Integer;
v_banner_logo,v_banner_banner,v_banner_titulo,v_banner_lema: String;
begin
v_checkconf := SQLExecute('SELECT count(id) FROM conf_ihs_est');
If (v_checkconf = 0) then
begin
MessageBox('No se ha encontrado una configuración, se establecerá una por defecto.','Configuración Dashboard',MB_Ok+MB_ICONINFORMATION);
v_banner_logo := '';
v_banner_banner := '';
v_banner_titulo := 'InteligenciaVial';
v_banner_lema := 'Escuela de Automovilismo';
v_titulo_left := 120;
v_lema_left := 120;
v_tiempo_actualizacion_datos_ds := 20000;
SQLExecute('INSERT INTO conf_ihs_est'+
'(banner_logo, banner_banner, banner_titulo, banner_lema, titulo_left, lema_left, tiempo_actualizacion_datos_ds) '+
'VALUES("'+v_banner_logo+'","'+v_banner_banner+'","'+v_banner_titulo+'","'+v_banner_lema+'",'+v_titulo_left+','+v_lema_left+','+v_tiempo_actualizacion_datos_ds+')');
End;
end;
The error gives me with the integer values. I think it is the syntax that I am using or if the data has to be cast.
Another question, if you notice I want to insert by default 2 images. What is the data type for an image?