2014-06-27 15:30:39 +02:00
|
|
|
object dmMain: TdmMain
|
|
|
|
Height = 214
|
|
|
|
Width = 438
|
|
|
|
object Connection: TFDConnection
|
|
|
|
Params.Strings = (
|
2021-04-07 19:14:12 +02:00
|
|
|
'Database=C:\DEV\dmvcframework\samples\data\ACTIVERECORDDB.FDB'
|
2014-06-27 15:30:39 +02:00
|
|
|
'User_Name=sysdba'
|
|
|
|
'Password=masterkey'
|
2019-03-16 17:20:28 +01:00
|
|
|
'Protocol=TCPIP'
|
|
|
|
'Server=localhost'
|
2020-09-29 19:57:43 +02:00
|
|
|
'ConnectionDef=articles_crud_db')
|
2014-06-27 15:30:39 +02:00
|
|
|
ConnectedStoredUsage = []
|
2014-06-27 16:38:49 +02:00
|
|
|
LoginPrompt = False
|
2014-06-27 15:30:39 +02:00
|
|
|
BeforeConnect = ConnectionBeforeConnect
|
|
|
|
Left = 64
|
|
|
|
Top = 48
|
|
|
|
end
|
|
|
|
object dsArticles: TFDQuery
|
|
|
|
Connection = Connection
|
|
|
|
UpdateOptions.AssignedValues = [uvFetchGeneratorsPoint, uvGeneratorName]
|
|
|
|
UpdateOptions.FetchGeneratorsPoint = gpImmediate
|
|
|
|
UpdateOptions.GeneratorName = 'GEN_ARTICOLI_ID'
|
|
|
|
UpdateOptions.UpdateTableName = 'ARTICOLI'
|
|
|
|
UpdateOptions.KeyFields = 'ID'
|
|
|
|
UpdateObject = updArticles
|
|
|
|
SQL.Strings = (
|
|
|
|
'SELECT * FROM ARTICOLI')
|
|
|
|
Left = 144
|
|
|
|
Top = 48
|
|
|
|
end
|
|
|
|
object updArticles: TFDUpdateSQL
|
|
|
|
Connection = Connection
|
|
|
|
InsertSQL.Strings = (
|
|
|
|
'INSERT INTO ARTICOLI'
|
|
|
|
'(ID, CODICE, DESCRIZIONE, PREZZO)'
|
|
|
|
'VALUES (:NEW_ID, :NEW_CODICE, :NEW_DESCRIZIONE, :NEW_PREZZO)'
|
2017-05-12 00:25:46 +02:00
|
|
|
'RETURNING ID {INTO :ID}')
|
2014-06-27 15:30:39 +02:00
|
|
|
ModifySQL.Strings = (
|
|
|
|
'UPDATE ARTICOLI'
|
2017-05-12 00:25:46 +02:00
|
|
|
|
|
|
|
'SET ID = :NEW_ID, CODICE = :NEW_CODICE, DESCRIZIONE = :NEW_DESCR' +
|
|
|
|
'IZIONE, '
|
2014-06-27 15:30:39 +02:00
|
|
|
' PREZZO = :NEW_PREZZO'
|
|
|
|
'WHERE ID = :OLD_ID'
|
2017-05-12 00:25:46 +02:00
|
|
|
'RETURNING ID')
|
2014-06-27 15:30:39 +02:00
|
|
|
DeleteSQL.Strings = (
|
|
|
|
'DELETE FROM ARTICOLI'
|
|
|
|
'WHERE ID = :OLD_ID')
|
|
|
|
FetchRowSQL.Strings = (
|
|
|
|
'SELECT ID, CODICE, DESCRIZIONE, PREZZO'
|
|
|
|
'FROM ARTICOLI'
|
|
|
|
'WHERE ID = :ID')
|
|
|
|
Left = 144
|
|
|
|
Top = 112
|
|
|
|
end
|
|
|
|
end
|