• Subject: Re: Creating a DDE-link between MS Acces and an NS/Elite Display
  • From: "David Bulog" <d2ba@xxxxxxxxxx>
  • Date: Thu, 26 Oct 2000 23:49:46 +1300

'///Step1-PLACE THIS CODE ON A FORM'///////////

Public Function ReadScreen(Position As String) As String        'Reads  &
Trims string

    ReadScreenTxtBox.LinkTopic = Trim(DDETopic)

    ReadScreenTxtBox.LinkItem = Position
    ReadScreenTxtBox.LinkMode = 2

    ReadScreenTxtBox.LinkRequest


    If Right(ReadScreenTxtBox.Text, 2) = Chr(13) & Chr(10) Then
        ReadScreen = Left(ReadScreenTxtBox.Text,
Len(ReadScreenTxtBox.Text) - 2) 'Trim off CR/LF
    Else
        ReadScreen = ReadScreenTxtBox.Text
    End If

    ReadScreen = Trim(ReadScreen)
End Function

'///////END OF STEP1////////////////////

'/////sTEP2---place these linse in general declarations of a module
Public Const DDE_Topic As String = "elite|2"
Const EnterKey                     As String = "{ENTER}"
Const ResetKey                     As String = "`"                 'Key
Const FieldExitKey                 As String = "@"

Dim AS400row1                    As String
'/////END OF STEP2/////////////////////////

'///Examples below to start session and write and read screen

SendKeys ("QSECOFR"), True
SendKeys ("{Tab}"), True
SendKeys ("QSECOFR"), True
SendKeys (EnterKey), True
AS400row1 = yourformname.ReadScreen("r1c1:t80") 'read entire 80 chars row1





Public Sub StartNSElite()
Const TermEmuStart As String = "C:\APPS\ELITE\E400\ELITE.EXE /N2"
Dim StartApp As Integer

StartApp = Shell(TermEmuStart, vbNormalNoFocus)

Delay (5)
'Delay 5 Secs

AppActivate ("NS/Router - YourNAME.RTR")        'Activate  Router
SendKeys ("{ENTER}")
DoEvents                                    'It needs this to process it

Delay (5)
'Delay 5 Secs

End Sub

Public Sub Delay(SecondsToWait As Integer)

Dim WaitUntilTime As Date

    WaitUntilTime = DateAdd("s", SecondsToWait, Now)
    Do
        DoEvents

    Loop Until Now >= WaitUntilTime

End Sub

hope this helps
cheers Dave





-----Original Message-----
From: Andreas.KOPP@de.imp-group.com <Andreas.KOPP@de.imp-group.com>
To: midrange-l@midrange.com <midrange-l@midrange.com>
Date: Wednesday, 25 October 2000 11:34
Subject: Creating a DDE-link between MS Acces and an NS/Elite Display


>Dear all
>
>I tried to use Microsoft Acces as DDE-Server but I failed. I could not
>initiate a link between Access and an NS/Elite Display.
>Maybe someone here has any experience?!
>
>To establish a link e.g to Excel I do it this simple way:
>
>Dim intChan1 as integer                  'the channel to be opened
>intChan1 = DDEInitiate("Excel", "Mappe1")     'open the link to "Mappe1"
>DDETerminate intChan1              'close the line
>
>
>I can't open a link to the NS/Elite Display because I don't now how to name
>the display (i.e. how to write the DDEInitiate command). Here are my
>settings in NS/Elite (Version 3.12):
>
>Workspace in NS/Administrator            Phoenix
>AS/400 Display name                BPCS Production
>
>when the session is open the window title is "Phoenix.BPCS Production -
>NS/Elite Display"
>The HLLAPI Name is "A" (in the session properties)
>
>
>I hope someone can help me.
>
>Best Regards
>A.Kopp
>The  information  contained  in this e-mail and any attachments is strictly
>        confidential  and  may be legally privileged. It is intended
>solely for the use of the individual or entity to whom it is addressed. If
>        you are not the named  addressee,  you are hereby notified that
>it is prohibited and may be unlawful  to disclose, copy, distribute, store,
>        copy the information in any medium or usage for another purpose.
>
>
>+---
>| This is the Midrange System Mailing List!
>| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
>| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
>| To unsubscribe from this list send email to
MIDRANGE-L-UNSUB@midrange.com.
>| Questions should be directed to the list owner/operator:
david@midrange.com
>+---

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.