mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 00:05:53 +01:00
58 lines
1.6 KiB
Plaintext
58 lines
1.6 KiB
Plaintext
|
object dmMain: TdmMain
|
||
|
OldCreateOrder = False
|
||
|
Height = 214
|
||
|
Width = 438
|
||
|
object Connection: TFDConnection
|
||
|
Params.Strings = (
|
||
|
'Database=C:\DEV\dmvcframework\samples\data\ACTIVERECORDDB.FDB'
|
||
|
'User_Name=sysdba'
|
||
|
'Password=masterkey'
|
||
|
'Protocol=TCPIP'
|
||
|
'Server=localhost'
|
||
|
'ConnectionDef=articles_crud_db')
|
||
|
ConnectedStoredUsage = []
|
||
|
LoginPrompt = False
|
||
|
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)'
|
||
|
'RETURNING ID {INTO :ID}')
|
||
|
ModifySQL.Strings = (
|
||
|
'UPDATE ARTICOLI'
|
||
|
|
||
|
'SET ID = :NEW_ID, CODICE = :NEW_CODICE, DESCRIZIONE = :NEW_DESCR' +
|
||
|
'IZIONE, '
|
||
|
' PREZZO = :NEW_PREZZO'
|
||
|
'WHERE ID = :OLD_ID'
|
||
|
'RETURNING ID')
|
||
|
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
|