I've been strugling for the last week or so to get a connection with MS asp.net pages to a running engine, my latest hurdle is error 104 when I'm trying to establish a queue. With great joy, I was able to get a response yesterday, but since have lost the connection.
Three cases as follows,
1) Dim oQueue as Object
CreateQueue Error -] Object reference not set to an instance of an object
2) Dim oQuee as RevSoftLib.IQueue
CreateQueue Error -] Object reference not set to an instance of an object.
3) Dim oQueue as New Object
CreateQueue Result 104
w2k sp3 server running IIS 5.0 Asp.net framework 1.1
oi 4.13
VisualBasic used
Here is the code
Imports RevSoftLib
Public Class Form
Public Revelation As RevelationPrivate Sub Get_It()Dim Result As LongDim strParams As StringDim ReturnValue As StringDim ex As ExceptionDim Engine As RevSoftLib.IEngineDim strAppId As String=WEB"Dim strAppUn As String=SYSPROG"Dim strAppPw As String="Dim strCallF As String=RUN_OECGI_REQUEST"Dim Buf() As Byte'ChDir("C:\Revsoft\OI32web\")Trace.Write("Creating myRevelation objects")Revelation=New RevelationTryResult=Revelation.CreateEngine(Engine, "\\.\:7890", strAppId, 2, 0)Catch exTrace.Warn("CreateEngine Error -] " & ex.Message)End TryTrace.Write("CreateEngine Result " & Result)If Result=0 Then'Create an active Queue.Trace.Write("In Queue")Dim oQueue As New ObjectTryResult=Engine.CreateQueue(oQueue, "", strAppId, strAppUn, strAppPw)Catch eEngine As ExceptionTrace.Warn("CreateQueue Error -] " & eEngine.Message)End TryTrace.Write("CreateQueue Result " & Result)If Result=0 Then'Call a Basic+ function...Dim oiRequest As StringoiRequest=$SUBMIT=PROC"oiRequest=oiRequest & "&PROC=INET_TRACE"'oiRequest=oiRequest & "&actn=new&page=request"oiRequest=Replace(oiRequest, "%20", " ")TryResult=oQueue.CallFunction(ReturnValue, strCallF, oiRequest)'Result=Queue.CallSubroutine("TESTASPNET", "")Catch eCall As ExceptionTrace.Warn("Call Error Message -] " & eCall.Message)End TryTrace.Write("CallFunction Result " & Result)If Result=0 ThenResponse.Write(ReturnValue)End IfoQueue.CloseQueue()oQueue=NothingEnd IfEngine.CloseEngine()Engine=NothingEnd IfRevelation=NothingEnd SubEnd Class
Any help would be appreciated.
Thanks,
Pascal Landry
Pascal:
I see you have chDir commented out.
I tried the same thing with regulat asp, found I could not start the rev objects without using chdir, found that chdir would not work on an asp page.
In the end I made a vb dll that had essentially your code in it, including the chdir. That worked for me.
Bob
Hi Bob,
Depending on which rights my user has, I being user1, 2, 3 on different machines. The Chdir directive gives me an error …"Could not find a part of the path". This I have to say is working from a web site.
The kicker for me was the declerations, I kept getting type mismatche and all sorts of other errors. I did as follows and it seems to be working quite well up to now.
Dim Engine as New Object
Dim oQueue as new Object
Contrary to delcaring them as revsoftlib.IEngine or .IQueue.
Creating web pages (or aspx) in Visual Studio .net, there have been a few changes from previous VB syntax. The one that kicked me was that there are no recordsets. The nice part though is that it's fairly easy to import the old function libraries into a project.
Now I just need to figure out what I can do with all this.
Thanks,
Pascal Landry
]]Now I just need to figure out what I can do with all this.
In revitalizing Revelation our goal is to build an open and enabling environment that evokes exactly that remark. That is why we like JOI so much – it too has that open and enabling philosophy.