Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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...
[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.
hi, I enabled it and updating is working properly. But insert is not working...