[Lazarus] SIGSEGV executing SqlDb
Santiago A.
svaa at ciberpiula.net
Wed Jan 10 13:13:07 CET 2018
Hello:
--------------
TestDb.Open;
sqlScript1.Execute; // ==> SIGSEGV
--------------
It uses SQLlite3 connector. No matter what are the contents of the
script I get "External: SIGSEGV" and jumps to debug assembler with a lot
of ??????. I can't enter step by step into function, or check anything.,
I only get SIGSEGV.
The SQL3lite.dll is in the executable directory and in the lazarus.exe
directory.
I have installed the package "sqlite3laz" v 0.4.
I have changed the SqlScript by an SQLQuery, the same error
I have attached the form. This is the first time I try to work with
SQldb and probably I'm doing something stupid or missing something
evident, but I can't see what. Nevertheless SIGSEGV is not very
informative. Any hint?
Lazarus V.1.8.0
FPC 3.0.4
SVN: 56594
i386-win32/win64
Runing on windows 7
--
Saludos
Santiago A.
-------------- next part --------------
object Form1: TForm1
Left = 256
Height = 322
Top = 128
Width = 558
Caption = 'Form1'
ClientHeight = 322
ClientWidth = 558
LCLVersion = '1.8.0.6'
object Button1: TButton
Left = 129
Height = 25
Top = 181
Width = 75
Caption = 'Button1'
OnClick = Button1Click
TabOrder = 0
end
object CabdiariTb: TDbf
FilePath = 'G:\OBJECT\001\'
IndexDefs = <>
ReadOnly = True
TableName = 'CABDIARI.DBF'
TableLevel = 4
FilterOptions = []
left = 22
top = 17
end
object LinDiariTb: TDbf
FilePath = 'G:\OBJECT\001\'
IndexDefs = <>
ReadOnly = True
TableName = 'LINDIARI.DBF'
TableLevel = 4
FilterOptions = []
left = 96
top = 17
object LinDiariTbF_ANNOASI: TStringField
FieldKind = fkData
FieldName = 'F_ANNOASI'
Index = 0
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 4
end
object LinDiariTbF_NUMASI: TStringField
FieldKind = fkData
FieldName = 'F_NUMASI'
Index = 1
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 6
end
object LinDiariTbF_FECHASI: TDateField
FieldKind = fkData
FieldName = 'F_FECHASI'
Index = 2
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
object LinDiariTbF_NUMDOC: TStringField
FieldKind = fkData
FieldName = 'F_NUMDOC'
Index = 3
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 12
end
object LinDiariTbF_FECHDOC: TDateField
FieldKind = fkData
FieldName = 'F_FECHDOC'
Index = 4
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
end
object LinDiariTbF_CUENTA: TStringField
FieldKind = fkData
FieldName = 'F_CUENTA'
Index = 5
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 10
end
object LinDiariTbF_IMPORTE: TFloatField
FieldKind = fkData
FieldName = 'F_IMPORTE'
Index = 6
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
MaxValue = 0
MinValue = 0
Precision = 2
end
object LinDiariTbF_DH: TStringField
FieldKind = fkData
FieldName = 'F_DH'
Index = 7
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 1
end
object LinDiariTbF_OBSERLIN: TStringField
FieldKind = fkData
FieldName = 'F_OBSERLIN'
Index = 8
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 50
end
object LinDiariTbF_CONCILIA: TBooleanField
FieldKind = fkData
FieldName = 'F_CONCILIA'
Index = 9
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
DisplayValues = 'True;False'
end
object LinDiariTbF_LIBROIVA: TStringField
FieldKind = fkData
FieldName = 'F_LIBROIVA'
Index = 10
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 1
end
object LinDiariTbF_TIPOCOD: TStringField
FieldKind = fkData
FieldName = 'F_TIPOCOD'
Index = 11
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 1
end
object LinDiariTbF_CODPERSO: TStringField
FieldKind = fkData
FieldName = 'F_CODPERSO'
Index = 12
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 6
end
object LinDiariTbF_NUMIVA: TStringField
FieldKind = fkData
FieldName = 'F_NUMIVA'
Index = 13
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 6
end
object LinDiariTbF_TIPIVA: TStringField
FieldKind = fkData
FieldName = 'F_TIPIVA'
Index = 14
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 1
end
object LinDiariTbF_C90: TStringField
FieldKind = fkData
FieldName = 'F_C90'
Index = 15
LookupCache = False
ProviderFlags = [pfInUpdate, pfInWhere]
ReadOnly = False
Required = False
Size = 10
end
end
object SaldosTb: TDbf
FilePath = 'G:\OBJECT\001\'
IndexDefs = <>
ReadOnly = True
TableName = 'SALDOS.DBF'
TableLevel = 4
FilterOptions = []
left = 176
top = 17
end
object CuentasTb: TDbf
FilePath = 'G:\OBJECT\001\'
IndexDefs = <>
ReadOnly = True
TableName = 'CUENTAS.DBF'
TableLevel = 4
FilterOptions = []
left = 240
top = 17
end
object ContabDb: TSQLite3Connection
Connected = False
LoginPrompt = False
DatabaseName = 'C:\temp\importadbf\datos\CONTAB.DAT'
KeepConnection = False
Transaction = SQLTransaction1
left = 386
top = 29
end
object SQLTransaction1: TSQLTransaction
Active = False
Database = ContabDb
left = 472
top = 29
end
object SQLScript1: TSQLScript
DataBase = ContabDb
Transaction = SQLTransaction1
UseDollarString = False
Directives.Strings = (
'SET TERM'
'COMMIT WORK'
'COMMIT RETAIN'
'COMMIT'
'#IFDEF'
'#IFNDEF'
'#ELSE'
'#ENDIF'
'#DEFINE'
'#UNDEF'
'#UNDEFINE'
)
Script.Strings = (
'create table cuentas'
'(cuenta varchar(10) not null,'
' nombre varchar(40) not null,'
' private key (cuenta));'
''
'create table apunte'
'(numasi integer not null'
' linea integer not null,'
' refasi integer not null,'
' fecha date not null,'
' cuenta varchar(10) not null,'
' importe numeric(15,2) not null,'
' observacion varchar(60) not null,'
' private key (numasi,linea));'
)
Terminator = ';'
CommentsinSQL = True
UseSetTerm = True
UseCommit = True
UseDefines = True
left = 384
top = 104
end
object SQLQuery1: TSQLQuery
FieldDefs = <>
Database = ContabDb
Transaction = SQLTransaction1
SQL.Strings = (
'create table cuentas'
'(cuenta varchar(10) not null,'
' nombre varchar(40) not null,'
' private key (cuenta));'
''
)
Params = <>
left = 331
top = 189
end
end
-------------- next part --------------
unit main;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, dbf, sqldb, db, sqlite3conn, FileUtil, Forms, Controls,
Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
CabdiariTb: TDbf;
LinDiariTb: TDbf;
LinDiariTbF_ANNOASI: TStringField;
LinDiariTbF_C90: TStringField;
LinDiariTbF_CODPERSO: TStringField;
LinDiariTbF_CONCILIA: TBooleanField;
LinDiariTbF_CUENTA: TStringField;
LinDiariTbF_DH: TStringField;
LinDiariTbF_FECHASI: TDateField;
LinDiariTbF_FECHDOC: TDateField;
LinDiariTbF_IMPORTE: TFloatField;
LinDiariTbF_LIBROIVA: TStringField;
LinDiariTbF_NUMASI: TStringField;
LinDiariTbF_NUMDOC: TStringField;
LinDiariTbF_NUMIVA: TStringField;
LinDiariTbF_OBSERLIN: TStringField;
LinDiariTbF_TIPIVA: TStringField;
LinDiariTbF_TIPOCOD: TStringField;
SaldosTb: TDbf;
CuentasTb: TDbf;
ContabDb: TSQLite3Connection;
SQLQuery1: TSQLQuery;
SQLScript1: TSQLScript;
SQLTransaction1: TSQLTransaction;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
ContabDb.Open;
SQLQuery1.ExecSQL;
// sqlScript1.Execute;
end;
end.
More information about the Lazarus
mailing list