Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi -
We are working on the write-back to the database and beloe are the steps followed.
- created .QVW with Input box for users to enter values.
- Written a Macro. see code below
sub DB
Dim objADO
Dim objRs
Dim strSQL
'This is the value which need to be inserted
'vcomment=ActiveDocument.GetVariable("vPrice").GetContent.String
'this is the filter condition that filters the rows which alone need to be updated in the table
vfield=ActiveDocument.GetVariable("vPrice").GetContent.String
'create ADO object
set objADO=CreateObject("ADODB.Connection")
'establish connection
objADO.Open "Driver={NetezzaSQL};servername=ip used;port=5480;database=dbname;username=usr1;password=password;"
'set SQL
strSQL="update Qlikview_QC_testtable set price='''&vfield''' where flag=123 "
'begin transcation
objADO.BeginTrans
'execute transaction
objADO.Execute strSQL,iAffected
objADO.CommitTrans
objADO.Close
Msgbox("DB updated")
end sub
- In the module "System Access" is provided under "Requested Module security", "Allow System Access" is selected for Current local security.
- When i open the report,
1. It does not allow me to modify the value and
2. Receive below error
Macro Parse failed. Functionality was lost
DB
Error: Safety settings on this computer prohibit accessind a data source on another domain.
Can you please let me know what could cause above issue. Are we missing any configuraiton from our side.
Also does the users need any additional privileges to the database to insert/update the data to the database.
Thanks for the help
Jag
Via access point meant that the local user and computer needs rights (through firewalls, port-blocking, group policies ...) to access the database. And with AJAX it won't work.
Maybe an alternatively is SQL Writeback from QlikView extension object.
- Marcus