Hi,
I am using a database connection snipet with the following code. All of the other buttons (First,Last,Update,Cancel) on the form execute properly with the exception of the AddNew button which is suppose to create a new record within a SQL database with an ODBC connection. Here is the error:
Error addNew Operation failed. Empty row set cannot be inserted. Row must have at least one column value set.
----- Form1.InjuryNotice.dbAddNew[1]::click: - (FormCalc, client) ----------------------------------
// Database control button >> add a new record.
// Changing records implies updating the current record with any changes. Enabling this statement would ensure that no changes are committed
// without the user explicitly using the Update button.
//xfa.sourceSet.DataConnection.cancel()
xfa.sourceSet.SupvrRprt.addNew()
I would aslo suggest removing any autoInc or ReadOnly fields from the DB.
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script