Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
wizardo
Creator III
Creator III

problem with DynamicUpdateCommand when insert values that contain COMMA and semicolon

hi all.

i am using DynamicUpdateCommand to insert values into a table: MyTable

the table has 2 fields:

Name

Description

this is the code


myStr= "INSERT INTO MyTable (varname1,varcontent1) VALUES (" & vName & "," & vDescription & ")"
objQVMain.DynamicUpdateCommand (myStr)


this works great in most cases.

but if one of the values to insert contains a comma or a semikolon then strange things happens

i was able to make it work when there is a coma in the value by adding dblquots around it

but this doesnt work for if the value contains semikolon and then the app just hangs.

here is my last try


myStr= "INSERT INTO MyTable (Name,Description ) VALUES (" & """" & vName& """" & "," & """" & vDescription & """" & ")"
objQVMain.DynamicUpdateCommand (myStr)


anyone ever had similiar problem?

0 Replies