Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have onve variable vSQL, this is set in a button and looks like:
= 'EXEC master.dbo.xp_AnalogWideHistory ' & vBatchStartTime & ', ' & vBatchStopTime & ', ' & 100000 & ', ' & vTag
The button then run a macro where I try to use this in EDX
SET SQL = ActiveDocument.Variables(vSQL)
(...)
GetEDXRequestString = "<Global method=""RequestEDX"" key=""" & strRequestKey & """><i_TaskIDOrTaskName>" & strTaskName & "</i_TaskIDOrTaskName><i_Password>" & strTaskPassword & "</i_Password><i_VariableName >vSQL</i_VariableName ><i_VariableValueList ><string>" & SQL.GetContent.String & "</string></i_VariableValueList ></Global>"
When I run the macro I get the following error:
Object required: 'SQL'
and it then highlights the last part of the GetEDXRequestString mentioned above.
What am I doing wrong?
Dan
Thanks.
The code stores the vSQL value.
I f I now get to solve the problem of actually running it I would be home free.
Maybe you know why this happends:
In the last line I add varSQL
GetEDXRequestString = "<Global method=""RequestEDX"" key=""" & strRequestKey & """><i_TaskIDOrTaskName>" & strTaskName & "</i_TaskIDOrTaskName><i_Password>" & strTaskPassword & "</i_Password><i_VariableName >varSQL</i_VariableName ><i_VariableValueList ><string>" & varSQL.GetContent.String & "</string></i_VariableValueList ></Global>"
This gives an error: Object required: 'varSQL'
Why?
I tried to add ActiveDocument.Reload at the bottom.
When running from server this works just fine, running from client does not work.
So it seems that what I need to make happend is that the edx should eb able to reload the document somehow.
Dan