{{tag>category:"OpenInsight 32-Bit" author:"Pascal Landry" author:"Bob Carten "}}
[[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]]
==== CreateQueue From ASP.net (OpenInsight 32-Bit) ====
=== At 29 JUL 2003 09:44:00AM Pascal Landry wrote: ===
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 Revelation
Private Sub Get_It()
Dim Result As Long
Dim strParams As String
Dim ReturnValue As String
Dim ex As Exception
Dim Engine As RevSoftLib.IEngine
Dim 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 Revelation
Try
Result=Revelation.CreateEngine(Engine, "\\.\:7890", strAppId, 2, 0)
Catch ex
Trace.Warn("CreateEngine Error -] " & ex.Message)
End Try
Trace.Write("CreateEngine Result " & Result)
If Result=0 Then
'Create an active Queue.
Trace.Write("In Queue")
Dim oQueue As New Object
Try
Result=Engine.CreateQueue(oQueue, "", strAppId, strAppUn, strAppPw)
Catch eEngine As Exception
Trace.Warn("CreateQueue Error -] " & eEngine.Message)
End Try
Trace.Write("CreateQueue Result " & Result)
If Result=0 Then
'Call a Basic+ function...
Dim oiRequest As String
oiRequest=$SUBMIT=PROC"
oiRequest=oiRequest & "&PROC=INET_TRACE"
'oiRequest=oiRequest & "&actn=new&page=request"
oiRequest=Replace(oiRequest, "%20", " ")
Try
Result=oQueue.CallFunction(ReturnValue, strCallF, oiRequest)
'Result=Queue.CallSubroutine("TESTASPNET", "")
Catch eCall As Exception
Trace.Warn("Call Error Message -] " & eCall.Message)
End Try
Trace.Write("CallFunction Result " & Result)
If Result=0 Then
Response.Write(ReturnValue)
End If
oQueue.CloseQueue()
oQueue=Nothing
End If
Engine.CloseEngine()
Engine=Nothing
End If
Revelation=Nothing
End Sub
End Class
Any help would be appreciated.
Thanks,
Pascal Landry
----
=== At 29 JUL 2003 02:28PM Bob Carten wrote: ===
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
----
=== At 30 JUL 2003 07:39AM Pascal Landry wrote: ===
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
----
=== At 30 JUL 2003 10:02AM Bob Carten wrote: ===
]]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.
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=1C20FB2A88EED40E85256D72004B70A1|View this thread on the Works forum...]]