Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am working on a new QlikView requirement where I am working to make QlikView Report/Dashboard more intuitive by making some transactional control on it.
I have a requirement where I want to call a stored procedure by a Button on QlikView.
So when I click the button, I want to run the following command EXEC sp_xx_yy
Please advice
Regards
Naveen
pfa
Vikas
Thanks for Sharing this Vikas. However, the QVW attached doesn't have a button.
I want the Stoerd Proc to be called when the button is clicked.
Regards
Naveen
In a macro use this :
For a query that won't return results:
DoCmd.RunSQL
For one that will:
Dim dBase As Database dBase.OpenRecordset
Syntax
expression.OpenRecordset(Name, Type, Options, LockEdit) , only use the "Name"
Name | Required | String | The source of the records for the new Recordset. The source can be a table name, a query name, or an SQL statement that returns records. For table-typeRecordset objects in Microsoft Access database engine databases, the source can only be a table name. |
Hope this helps
Regards!
What do you want to do with proc results? Refresh your data?
Hi Clever,
No - I will just set a value on the database with this stored procedure. I don't want to refresh any data or bring this data to the front.
Cheers
Naveen
Rau`l,
Thanks - I'll check this and get back to you.
Regards
Naveen
Update
I am thinking of the following approach :
1) Create a Button in Qlikview
2) Add a action on the button (External > Macro)
3) Write a VB program on on that Macro and call the SQL Stored Proc
I am not sure on what impact this could have on the performance etc, but I'll try this and keep you posted
Regards
Naveen
Yep, thats the point off my recently post, maybe you need to use the "System Acces Mode" in the Macro , and let "Alloe System Acces". Good luck!
Naveen Vyas, set the direction, you can execute using macros (vbScript)
you macro code should be like this
sp = "YOUR STORED PROCEDURE"
Set cmd = CreateObject("ADODB.Command")
With cmd
.ActiveConnection = "YOUR CONNECTION STRING"
.CommandType = 4
.CommandText = sp
.Execute
End With
Set cmd = Nothing