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
Clever Anjos - Thanks for this.
But, where am I calling the Stoerd Procedure here ?
I mean the "EXEC sp" command ?
I also need to pass a few variables with this Stored Procedure, But I'll handle the variables separately.
It executes on line 08 .Execute
If you need to suply parameters use as this
sp = "YOUR STORED PROCEDURE"
Set cmd = CreateObject("ADODB.Command")
With cmd
.ActiveConnection = "YOUR CONNECTION STRING"
.CommandType = 4
.Parameters.Append .CreateParameter("@param1", adVarWChar, adParamInput, 50, "a value")
.Parameters.Append .CreateParameter("@param2", adVarWChar, adParamInput, 50, "another value")
.CommandText = sp
.Execute ' this will execute your proc
End With
Set cmd = Nothing
Good remembering
what i am doing wrong here
SUB insert
Set cmd = CreateObject("ADODB.Command")
With cmd
.ActiveConnection = "Provider=sqloledb;Data Source=servername;Initial Catalog=DB"
.CommandType = 4
.CommandText = "INSERT INTO [DB].[Utility].[QlikviewLoadInfo] ([QlikAppNM],[RunDT]) VALUES ('Test', '2022-10-19')"
.Execute
End With
Set cmd = Nothing
End Sub