Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 06 JAN 2009 06:46:30AM Fredrik Berling wrote:

Hi!

I am curious about what the best way to build a website that can collect OpenInsight 8.0.1 data would be. Since I have some experience with ASP.NET, C# and SQL I would very much want a similar way of communicating with the server.

When checking the Knowledge database i found an article about OI4Web. Would you recommend building an advanced web application with this technique? And in that case, how can it be obtained?


At 07 JAN 2009 10:59AM Pascal Landry wrote:

This may not be the best way, but it's been working for me for the last 10 years without a hickup and relatively no update, but all my formes are served as the return value of a function, or in other words, I have an OI function for each forme. If that forme is required to send out the data, it can be populated in the function.

Most requests are handled through one Inet_function, which calls the appropriate function and returns the html data. Write requests usually have there own Inet_function which the calls the appropriate function to return the corresponding forme.

So in a sense, it is quite like .Net where most of the processing is done on the server.

This is just one of many ways to build a web site with OI, you can even aspx pages that communicate directly to an oengine with the xrev.dll.

Pascal Landry


At 11 JAN 2009 09:03AM Fredrik Berling wrote:

Thanks for your reply. I was a bit curious about the xrev.dll way, so i made a small visual C# application to test it. However it doesn't seem to work as i get an ExecutionEngineException on the rev.CreateEngine call.

Here is the code:

static void Main(string args)

{

  Revelation rev=new Revelation();
  IEngine pEngine;
  long l=-23;
  l=rev.CreateEngine(out pEngine, ":777", "SYSPROG", 0, 0);
  pEngine.CloseEngine();
  Console.WriteLine(l);
  Console.ReadLine();

}


At 12 JAN 2009 08:43AM Pascal Landry wrote:

This is part of my connection string, although in vb and compiled in Visual Studio 2003 I beleive, it should give you some info. This function connects to a local copy of oi on port 7993 and executes a function called "DNET_WEB_PREFS". For more detailed insight, search for topic from Bob Carten.

Public Shared Function [/color]OICallFunction(ByVal strCallF As String, ByVal oiRequest As String, ByVal myReturnVal As String) As String[/color]         [/color]Dim [/color]Result As [/color]Long[/color]         [/color]Dim [/color]strParams As String[/color]         [/color]Dim [/color]strAppId As String = [/color]"APP"[/color]         [/color]Dim [/color]strAppUn As String = [/color]"USR"[/color]         [/color]Dim [/color]strAppPw As String = [/color]"PASSWORD"[/color]         [/color]Dim [/color]zEngine As RevSoftLib.IEngine[/color]         [/color]Dim [/color]zRevelation As New Revelation[/color] [/color]         Result = zRevelation.CreateEngine(zEngine, [/color]"\\.\:7993"[/color], strAppId, [/color]2[/color], [/color]1[/color])[/color]         [/color]If [/color]Result = [/color]0 [/color]Then[/color]             [/color]Dim [/color]zQueue As RevSoftLib.IQueue[/color] [/color]             [/color]'Dim iQueue As New Object[/color]             Result = zEngine.CreateQueue(zQueue, [/color]""[/color], strAppId, strAppUn, strAppPw)[/color] [/color]             [/color]If [/color]Result = [/color]0 [/color]Then[/color]                 [/color]'Call a Basic+ function…[/color]                 [/color]'strCallF = "DNET_WEB_PREFS"[/color]                 [/color]'oiRequest = User.Identity.Name.ToUpper[/color]                 [/color]'oiRequest = Replace(oiRequest, "%20", " ")[/color] [/color]                 Result = zQueue.CallFunction(myReturnVal, strCallF, oiRequest)[/color]                 zQueue.CloseQueue()[/color]                 zQueue = Nothing[/color]             [/color]End If[/color]             zEngine.CloseEngine()[/color] [/color]         [/color]End If[/color]         zRevelation = Nothing[/color]         [/color]If [/color]myReturnVal <> [/color]"" [/color]Then[/color]             [/color]Return [/color]myReturnVal[/color]         [/color]End If[/color] [/color]End Function[/color][/color][/size]


At 12 JAN 2009 08:49AM Pascal Landry wrote:

Sorry, the previous should have read:

This is part of my connection string, although in vb and compiled in Visual Studio 2003 I beleive, it should give you some info. This function connects to a local copy of oi on port 7993 and executes a function called "DNET_WEB_PREFS". For more detailed insight, search for topic from Bob Carten.

#Region " Oinsight communicator"

  Public Shared Function OICallUser(ByVal strCallF As String, ByVal oiRequest As String, ByVal myReturnVal As String) As String
      Dim Result As Long
      Dim strAppId As String=APP"
      Dim strAppUn As String=USER"
      Dim strAppPw As String=PassWord"
      Dim uEngine As RevSoftLib.IEngine
      Dim uRevelation As New Revelation
      Result=uRevelation.CreateEngine(uEngine, "\\.\7993", strAppId, 2, 1)
      If Result=0 Then
          Dim uQueue As RevSoftLib.IQueue
          Result=uEngine.CreateQueue(uQueue, "", strAppId, strAppUn, strAppPw)
          If Result=0 Then
              'Call a Basic+ function...
              'oiRequest=User.Identity.Name.ToUpper
              oiRequest=Replace(oiRequest, "%20", " ")
              Result=uQueue.CallFunction(myReturnVal, strCallF, oiRequest)
              uQueue.CloseQueue()
              uQueue=Nothing
          End If
          uEngine.CloseEngine()
          'uEngine=Nothing
      End If
      uRevelation=Nothing
      If myReturnVal  "" Then
          Return myReturnVal
      End If
  End Function

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/9df5f63d7a367abb852575360040aeb0.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1