I am a new user of your forum

Moderator: Moderatoren

Antworten
Benutzeravatar
rdonnay
Rookie
Rookie
Beiträge: 3
Registriert: Fr, 14. Jan 2022 18:30
Danksagung erhalten: 6 Mal

I am a new user of your forum

Beitrag von rdonnay »

Tom Liehr recommended a link to this forum about getting remote ADS info from a server using ADS stored procedures.
That was a good suggestion.

Here is a utility named AdsMgt.Exe.

Copy the attached files to your \exp20\samples\adssql folder.

AdsMgt.Ini contains the connection info to your ADS server.

There are 3 Browse screens:
1. Users: Contains a list of all open connections to the server.
2. User Tables: A One-2-Many browse of Tables opened by the selected user.
3. user Locks: A One-2-Many browse of Record Locks on the selected table.

The Kill User button will disconnect the selected user. It will prompt first.

NOTE: This very simple management tool is possible due to the sp_mg* stored procedures in ADS that are called by the eXpress++ SQL command.

Code: Alles auswählen

STATIC FUNCTION LoadConnectedUsers( oBrowse, aObjects )

LOCAL cSql, cAlias := 'USERS'

ASize(aObjects,0)

TEXT INTO cSql WRAP
SELECT * FROM
(
  EXECUTE PROCEDURE sp_mgGetConnectedUsers()
) anyalias
ENDTEXT

SQL cSql INTO OBJECTS aObjects INTO CURSOR cAlias VIA (Ads_SessionDict())

IF Valtype(oBrowse) == 'O'
  oBrowse:refreshAll()
ENDIF

dbCloseArea()

RETURN nil
adsmgt.jpg
adsmgt.jpg (217.35 KiB) 3178 mal betrachtet
Dateianhänge
adsmgt.zip
(174.64 KiB) 139-mal heruntergeladen
Benutzeravatar
Tom
Der Entwickler von "Deep Thought"
Der Entwickler von "Deep Thought"
Beiträge: 9345
Registriert: Do, 22. Sep 2005 23:11
Wohnort: Berlin
Hat sich bedankt: 100 Mal
Danksagung erhalten: 359 Mal
Kontaktdaten:

Re: I am a new user of your forum

Beitrag von Tom »

Cool to have you here. 8)
Herzlich,
Tom
Benutzeravatar
rdonnay
Rookie
Rookie
Beiträge: 3
Registriert: Fr, 14. Jan 2022 18:30
Danksagung erhalten: 6 Mal

Re: I am a new user of your forum

Beitrag von rdonnay »

I confirmed that Bob Volz's failure of AdsMgt.exe was because he had an older version of ADSDBE.DLL.

I am not sure which version fixed this problem, but I confirmed that ADSDBE.DLLs dated 2019 or earlier will fail.

I copied the most current ADSDBE.DLL to the SqlQuery folder and everything worked ok.

The problem was that the stored procedure Sp_mgGetConnectedUsers() was returning a cursor, but there were no fields recognized by ADSDBE.
dbStruct() would return an empty array.
Antworten