Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi
I don't have a clue really but that doesn't stop me from guessing 😉
Can it be something in your server environment?
Try creating an external vbs-file with the first part of your macro:
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
Save it as test.vbs on your server and then run the following command from the commandline:
cscript test.vbx //x
That should bring up the debugger and you can check and make sure that this part of the macro is working.
My hunch is that something will crash...
Either way, you should be one step closer to a solution.
/Fredrik
Hi Fredrik,
I tried that, and got the following error:
C:\Documents and Settings\User1\Desktop\test.vbs(3, 2) ADODB.Connection: Provi
der is not specified and there is no designated default provider.
Any clue?
Kind regards,
Kjetil Tveit
Hello again
Are you running a 64bit server?
There are others experiencing the same kind of issues that you are, here for instance:
http://www.calcaria.net/ASP/2006/04/provider-not-specified-and-there-is-no.html
I think Google is your best friend right now, I'm not the technical guy myself..
Please post any answers that you find, I bet there are other people that are interested.
/Fredrik
Hi Fredik,
I've been trying back and forth from all over the place. Still have not found a working solution...
I will post back if I find anything that can solve this problem.
BTW; It's a 64 bit machine...
Hi, did you get an answer to this problem yet? I get the same thing error as in your subject line, after that all my code references to all macros (small left box on the left) are gone.
I'm only guessing, but I think it's caused by licensing issues. Real Time updates on the Server require additional license for a Real-Time Server. If you don't have this license, you solution might be working fine on a Desktop but failing on the server. Once again, it's only a guess...
Hi Oleg, I do not run on server, only local PC.
Let me try a guess here too.
If I am not mistaken, a macro run in the IE plugin runs on the local user's machine, not the server. Could it be the login & drivers from the local users' machines? Just a thought.
Jonathan
Jonathan - I'm not totally confident on this one, but I don't think the macro runs on the client side - I always thought it's running on the server, and that's why most of the client-side APIs are not supported in a server environment...
BurgerSurfer - the initial question was about running it on the server, and my guess applied to that situtation. I don't know what's happening in your case.
Actually, I do have one "long shot" suggestion... If you are trying to use dynamic updates, even locally, you need to check a checkbox "Enable Dynamic Data Update" - it's located in Document Properties, under "Server". Ironically, you need to do it even if you don't run the document on the server.
see if this solves the problem...