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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro parse failed. Functionality was lost

Hi everyone,

I have made a macro that get's data when pushing a button and puts the data into fields(Using an ODBC connection). This works fine when I run it locally, but when i try to run it with a connection to the server, ajax plugin, java plugin og IE plugin i get the error message in the topic.

In the load script I have:

LOCATION:
LOAD * INLINE [
LOCATIONID, LOCATIONNAME
];

The macro is connected to a button, the macro is:

sub GetLocations
dim sConn, oRS, sSQL
set sConn=CreateObject("ADODB.Connection")
sConn.Open "ODBC_1", "read_only", "read_only"
set oRS =CreateObject("ADODB.Recordset")
sSQL="SELECT LOCATIONID, LOCATIONNAME FROM LOCATIONS"
oRS.Open sSQL, sConn
set Result = oRS
While (Not Result.EOF)
query="INSERT INTO LOCATION (LOCATIONID, LOCATIONNAME) VALUES (" & Result.Fields(0).Value & "," & Result.Fields(1).Value & ")"
SET Inputting = ActiveDocument.DynamicUpdateCommand (query)
Result.MoveNext
Wend
end sub

Why is this only working locally? I've searched this forum and read what I can find about this, tried security settings back and forth, but no way if it wants to work from the server.

Running Version 9 on server and locally.

Any clues? Tips? Tricks? Would really appreciate it!

Kind regards,
Kjetil

10 Replies
richardpayne
Creator
Creator

I'm beginning to believe the contrary about macros running server-side. I have an application making a connection to an Oracle server to make an update, and it works through the access point on developer machines which have Oracle installed.

Our users for this application, however, recieve an error when running the macro stating the provider cannot be found. This makes me think the db connection is being made client-side, which is a huge inconvenience. Does anyone know if this is the case?

I have checked the "allow dynamic updates", and the macros have been given the most liberal of permissions.

The code is your standard db connection:


' Make the connection
Set oConn = CreateObject("ADODB.Connection")
sConn = "Provider=OraOLEDB.Oracle.1;Persist Security Info=False;User ID=user;Password=password;Data Source=datawhs;"


*Edit: Used the

tags like a good boy. </body>