Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I need to insert data from qlikview into sql database.
Have written the below macro.
But it does not work.
What is the problem with the macro.
Sub Insert_Comment
Dim objADO
Dim objRs
Dim strSQL
vName=ActiveDocument.GetVariable("vName").GetContent.String
Set objADO = CreateObject("ADODB.Connection")
objADO.Open "Provider=Mysql ODBC 5.1 Driver;Data Source=testsql;User ID=cNXWPZdNPDdQN;Password=cMKEGZdNPDdWO;"
strSQL="insert into EMPLOYEE values(‘"&vName&"‘)"
objADO.BeginTrans
objADO.Execute strSQL
objADO.CommitTrans
objADO.Close
Msgbox("Comment Updated")
End Sub
Thanks and Regards,
Priya
Hi,
Perhaps you can solve the problem looking at this post:
Hi,
I think Ariel reply should help you out. I just had to add to the post. When I first started with QlikView I as the question about writing back and the answer I got at first was "This is QlikView and not QlikWrite". Then they told me how to do it.
Bill