I
IP and Access 2003 - custom button.
Access 2003 database
Infopath 2003
Im trying to create custom update and new records buttons using access query
"like calling a store procedure".
The code i wrote is in Microsoft Script editor.
I have found a nice example on Microsoft website.
http://msdn.microsoft.com/en-us/kb/kb00827007.aspx#10
For my testing i create a really simple table with only two fields
userid = autonumber and username as text "50 character".
I also create a sql query to insert new user in the table, tested it and it
works.
When i preview the form and press the button i don't have any error but the
database does not get updated.
The code wrote in the button even is:
Does anyone know why this code doesn't work on updating the table?
Infopath 2003
Im trying to create custom update and new records buttons using access query
"like calling a store procedure".
The code i wrote is in Microsoft Script editor.
I have found a nice example on Microsoft website.
http://msdn.microsoft.com/en-us/kb/kb00827007.aspx#10
For my testing i create a really simple table with only two fields
userid = autonumber and username as text "50 character".
I also create a sql query to insert new user in the table, tested it and it
works.
When i preview the form and press the button i don't have any error but the
database does not get updated.
The code wrote in the button even is:
Code:
var UserName =
XDocument.DOM.selectSingleNode("/dfs:myFields/my:TextField").text;
XDocument.QueryAdapter.Command = 'EXEC "NewEmployee" ' +UserName;
XDocument.Query();
Does anyone know why this code doesn't work on updating the table?