1 / 13

OpenEdge og.NET

OpenEdge og.NET. PUG Norway Lillehammer 2004. Jan Kolstad. Om ProVentus. Mer enn 50 års erfaring med Progress 3 års erfaring med Microsoft Samarbeider med ”Norges mest sertifiserte” PSDN-medlem Sikrer tilgang til all software fra Progress MSDN-medlem

esme
Download Presentation

OpenEdge og.NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OpenEdge og.NET PUG Norway Lillehammer 2004 Jan Kolstad

  2. Om ProVentus • Mer enn 50 års erfaring med Progress • 3 års erfaring med Microsoft • Samarbeider med ”Norges mest sertifiserte” • PSDN-medlem • Sikrer tilgang til all software fra Progress • MSDN-medlem • Sikrer tilgang til all software fra Microsoft

  3. ProVentus’ satsningsområder • Rapportsystemet ProXtract • Bidra til modernisering av Progress-miljøet • Database og applikasjonstuning

  4. Agenda • 4GL brukt av .NET • Litt om ProDataset • Utviklingsprosessen • Fra 4GL gjennom ProxyGen til .NET • Logfila på AppServeren i WinTail e.l. • Litt om WebServices • Div. demoer underveis

  5. Krav til installasjonen • Progress OpenEdge • Visual Studio .NET • Webserver

  6. Enkel 4GL-prosedyre DEF INPUT PARAM iUsername AS CHAR NO-UNDO. DEF INPUT PARAM iPassword AS CHAR NO-UNDO. DEF OUTPUT PARAM oStatus AS CHAR NO-UNDO. IF iUsername = "Test" AND iPassword = "Test" THEN ASSIGN oStatus = "OK". ELSE ASSIGN oStatus = "Feil brukernavn og/eller passord".

  7. Litt om ProDataset DEFINE TEMP-TABLE ttCompany LIKE Company. DEFINE DATASET Company FOR ttCompany. DEFINE QUERY qCompany FOR Company. DEFINE DATA-SOURCE dsCompany FOR QUERY qCompany. DEFINE OUTPUT PARAMETER DATASET FOR Company. DEFINE OUTPUT PARAMETER sError AS CHAR FORMAT "x(20)" NO-UNDO. DEF VAR retok AS LOG NO-UNDO. DEF VAR hCompany AS HANDLE NO-UNDO. DEF VAR hqCompany AS HANDLE NO-UNDO. ASSIGN hqCompany = QUERY qCompany:HANDLE. ASSIGN retok = hqCompany:QUERY-PREPARE("for each Company"). IF NOT retok THEN DO: ASSIGN sError = "QUERY-PREPARE failed" . RETURN. END. BUFFER ttCompany:handle:ATTACH-DATA-SOURCE(DATA-SOURCE dsCompany:HANDLE,?,?,?). ASSIGN retok = DATASET Company:FILL(). IF NOT retok THEN ASSIGN sError = "FILL failed”.

  8. Klargjøring for .NET • Kompilere 4GL-prosedyrene • Bruke Proxy Generator • Generere for .NET

  9. Opprette .NET prosjekt • Legge inn referanse til filene • Progress.Messages • Progress.o4glrt • Importere namespaces • Imports Progress.Open4GL.Proxy • Imports Progress.Open4GL • Imports Progress.Open4GL.Exceptions • Imports NPUGproxy

  10. Bruk av Login-prosedyren Public Function loginOk(ByVal strUsername As String, ByVal strPassword As String) As Boolean Dim m_conn As Connection = Nothing Dim m_login As NPUGdemo = Nothing Dim wConn As String = "AppServer://janko3:5162/NPUG" Dim wStatus As String = Nothing Try m_conn = New Connection(wConn, "", "", "") m_conn.Url = wConn m_login = New NPUGdemo(m_conn) m_login.login(strUsername, strPassword, wStatus) If wStatus = "OK" Then assign loginOk = True Catch e As Exception MsgBox("Klarer ikke tilknytte appserver: " + e.Message, MsgBoxStyle.Critical) End Try If Not m_login Is Nothing Then m_login.Dispose() m_login = Nothing m_conn = Nothing End Function

  11. Vise resultatet • Windows- og Web-utgave • Se på AppServeren og loggen fra denne

  12. WebService fra Progress eller .NET Ikke nødvendigvis smart, men kjekt å vite likevel?

  13. Eksempel på bruk av WebService • Excel • Crystal Reports

More Related