Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

insert using DynamicUpdateCommand throws error with null value

Hi i tried to use QV9 dynamicupdatecommand to insert values in a table . I took sample DB in examples folder and tried to update the inmemory table.

sub insert
set EmployeeID= ActiveDocument.Variables("EmployeeID").GetContent
set EmployeeName= ActiveDocument.Variables("EmployeeName").GetContent
set Extension= ActiveDocument.Variables("Extension").GetContent
set Hire_x0020_Date= ActiveDocument.Variables("Hire_x0020_Date").GetContent
set ID= ActiveDocument.Variables("ID").GetContent
set Office= ActiveDocument.Variables("Office").GetContent
set Report_x0020_To= ActiveDocument.Variables("Report_x0020_To").GetContent
set Title= ActiveDocument.Variables("Title").GetContent
set Year_x0020_Salary= ActiveDocument.Variables("Year_x0020_Salary").GetContent
set DocProp= ActiveDocument.GetProperties
DocProp.EnableDynamicDataUpdate = true
ActiveDocument.SetProperties DocProp
query="Insert into Employees EmployeeID,EmployeeName,Extension,Hire_x0020_Date,ID,Office,Report_x0020_To,Title,Year_x0020_Salary) values('" & EmployeeID.String &"','" & EmployeeName.String &"','" & Extension.String &"','" & Hire_x0020_Date.String &"','" & ID.String &"','" & Office.String &"','" & Report_x0020_To.String &"','" & Title.String &"','" & Year_x0020_Salary.String & "')"
msgbox(query)
set queryerr = ActiveDocument.DynamicUpdateCommand(query)
if (queryerr = false) then
MsgBox queryerr.ErrorMessage
exit sub
end if
end sub

error loading image

error loading image

The table is not upadted. Its showing that sql is throwing some error bze the error flag is set, but i dont know what the error is. Can anyone help me in this...

2 Replies
Highlighted
Not applicable

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/2158.dynamic.TIF:550:0]

In document properties enable Dynamic Data Update.

Highlighted
Not applicable

hi, I enabled it and updating is working properly. But insert is not working...