?? readme.txt
字號:
RDBMSResolver - ASP Example
Version 2 with updatePacket returned to Flash
This is a fully functional simple Contact Editor. It utilizes FlashMX04 XMLConnector,Dataset and RDBMSResolver with data binding. This example works with MS Access, only a few minor setting changes are needed for SQL Server and other smarter dbs. Full comments explain this in the rdbms-asp2.asp.
Place the zip file contents in a web folder and access via http to "rdbms-asp2.html":
rdbms-asp2.fla / swf - Flash files
rdbms-asp2.as - Flash ActionScript that compiles with the fla
rdbms-asp2.mdb - Access DB this example uses.
rdbms-asp2.asp - ASP file that processes requests from the swf
Operational Description:
1) GetContacts_xmlcon is triggered when the program starts. The results are bound to the dataset.
2) The dataset has items bound out to the grid and selectedIndex bound in/out to the grid. This lets you select a record on the grid and have the dataset iterator go to the same record.
3) The edit fields are bound in/out to the dataset properties. When you change an entry in the fields, the dataset and the grid change to match.
4) You can add/delete/change records at will. When ready, push the "Save Changes to Database" button. The Dataset gets an applyUpdates() call which creates the deltaPacket which is bound to the RDBMSResolver. The updatePacket out of the RDBMSResolver is bound to the updatePacket node of the SaveContacts_xmlcon parameters. The updatePacket will also show in the packets window.
5) If you have set the kind of SaveContacts_xmlcon.data.updatepacket to "none", press the "Trigger SaveContacts_xmlcon" to trigger the updatePacket send to ASP.
6) The ASP sends back the results_packet which is bound to the updateResults property of the the resolver. Since it has an in/out dataProvider binding with the dataset, a new resolver deltaPacket is returned to the dataset and the dataset (and subsequently the grid) are updated. All new records will have their proper id's.
Known issues:
>You must put something in each field to save correctly. If you don't, the ASP will report an error back in the results_packet for that operation. The error will show at the top of the Errors listbox. If the error is too long to read the SQL statement that failed (ASP put it on the end of the error description), click the error and the full error will show in the Info field.
>You can't put a quote in any of the fields, it causes that node to be removed from the updatePacket. I think this is because a quote messes up the XML attribute containing the data. I'll be working on this - if you know the answer - let me know!
>This example now has event trapping for ASP failures. Status info will appear in the Info window. This example ignores the "Status_change" code of the status event.
Have fun and Aloha,
Pilipo
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -