Thank you very much! Now I can insert and modify records, calculated fields work well.
However, it remains the problem I cannot move among records, the FBDataset still remain always on the first record.
What can I do? I post the settings of FBDataSet (from my lfm file), I cannot understand where I wrong.
Thank you again for your help.
Best regards,
Stefano
object FBDataSet1: TFBDataSet
Active = True
AfterInsert = FBDataSet1AfterInsert
OnCalcFields = FBDataSet1CalcFields
AutoUpdateOptions.IncrementBy = 1
DataSource = Datasource3
DefaultFormats.DisplayFormatNumeric = '#,##0.0'
DefaultFormats.DisplayFormatInteger = '#,##0'
DataBase = JvUIBDataBase1
Macros = <>
Option = [poTrimCharFields, poRefreshAfterPost]
Transaction = JvUIBTransaction1
UpdateTransaction = JvUIBTransaction1
UpdateRecordTypes = [cusUnmodified, cusModified, cusInserted]
SQLSelect.Strings = (
'SELECT * FROM TABELLA1'
)
SQLRefresh.Strings = (
'select'
' *'
'from'
' TABELLA1'
'where'
' TABELLA1.NUMERO = :NUMERO'
' '
)
SQLEdit.Strings = (
'update'
' TABELLA1'
'set '
' DESCRIZIONE = :DESCRIZIONE,'
' CATEGORIA = :CATEGORIA'
'where'
' TABELLA1.NUMERO = :NUMERO'
)
SQLDelete.Strings = (
'delete'
'from'
' TABELLA1'
'where'
' TABELLA1.NUMERO = :NUMERO'
)
SQLInsert.Strings = (
'insert into TABELLA1'
'(NUMERO, DESCRIZIONE, CATEGORIA)'
'values (:NUMERO, :DESCRIZIONE, :CATEGORIA)'
)
left = 284
top = 612
object FBDataSet1NUMERO1: TLongintField
AlignMent = taRightJustify
DisplayWidth = 10
FieldName = 'NUMERO'
DisplayFormat = '#,##0'
end
object FBDataSet1CALC1: TFBStringField
DisplayWidth = 10
FieldKind = fkCalculated
FieldName = 'CALC'
Index = 1
Size = 10
end
object FBDataSet1CATEGORIA1: TLongintField
AlignMent = taRightJustify
DisplayWidth = 10
FieldName = 'CATEGORIA'
Index = 2
DisplayFormat = '#,##0'
end
object FBDataSet1DESCRIZIONE1: TFBStringField
DisplayWidth = 10
FieldName = 'DESCRIZIONE'
Index = 3
Size = 10
end
end
object JvUIBDataBase1: TJvUIBDataBase
Params.Strings = (
'sql_dialect=3'
'lc_ctype=NONE'
'user_name=SYSDBA'
'password=masterkey'
)
DatabaseName = 'e:\delphi\firebird\serverprova.gdb'
UserName = 'SYSDBA'
PassWord = 'masterkey'
LibraryName = 'fbclient.dll'
MetaDataOptions.Procedures = [OIDProcFieldOut]
Connected = True
left = 321
top = 612
end
object JvUIBTransaction1: TJvUIBTransaction
DataBase = JvUIBDataBase1
Options = [tpConcurrency, tpWait, tpRead, tpWrite]
left = 357
top = 608
end