English
Forum

DBase Databases - similar Datensätze in a Loop from different Databases l&

 
- Page 1 -



holmol93
Hello together

here's me already erstklassig with of my first question helped been and if I slow but sure increasingly behind the whole Topic soar, stand I still time again to one, for me, unlösbaren trouble.

to that construction of my Program:
its one Program circa a school To manage. for me one proposition for a couple items dazuzulernen.
teacher and schoolboy having Own Benutzerkonten, functions and rumble (zB. "Klassenlehrer";"Schulleiter","Klassensprecher") can distributed and be there's a Rechteverwaltung, in which one whom Benutzern on ihren Accounts gewisse read and Schreibrechte limit can.

there's in the background different Databases. an with Benutzerdaten (address,old,strain,Password,name,Username), a with the zugeteilten Rechten. moreover has each person one own Datenbankfile, of what the software automatically prepares becomes. with Lehrern contains it The classes, The it attached get to the schema "KLASSE","SCHÜLERNAME","FACH", with whom Schülern your notes and Absenzen, to the schema "LEHRER","FACH","NOTE", or: "ABSENZ"....

now should it a function give circa Benutzerdaten To change and user To delete.
If I a user lösche, must I its entry from the Benutzerdatenbank, from the Rechtedatenbank and his own DB File Remove. the works free from problems.

now becomes whom Lehrern but in the Notenübersicht still a "Leiche" with the erased Schülernamen displayed, there this Yes in the jeweiligen DB File the Lehrers mitverlinkt is.

Diesen must I means herauslöschen.

I have me the following consider:
the Program reads in the Schülerdatenbank The names the teacher from, The it notes or Absenzen registered having -> Fachlehrer.
then opens it the jeweilige DB File with the Lehrernamen and deletes any Entries in which the name the Schülers vorkommt. the must number of times in Loop occur, there it Yes several teacher are and a teacher zT too 2 Fächer teaching can.

In of my Loop deletes But always only whom names the Schülers from the data base the first Lehrers, the it a note given has and I am Real ratlos... The code (not run) sees so from:
db ("open",#1,dbuserdata$)' opens The Benutzerdatenbank
db ("use",#1)
db ("seek","USERNAME",personausw$,2)' seek whom names the Schülers
db ("delete")' deletes it
db ("pack")
db ("close",#1)
db ("open",#2,dbrechte$)' opens The Rechtedatenbank
db ("use",#2)
db ("seek","USERNAME",personausw$,2)' seek whom schoolboy
db ("delete")' deletes its entry
db ("pack")
db ("close",#2)
db ("open",#3,dbpendenzen$)' opens The data base for the Logfile
db ("AppendBlank")
db ("put","AN","SUPER-T")' hinterlässt a Logileeintrag for the Delete the Schülers
db ("put","MESSAGE",dt("getdate",6)+" "+trim$(user$)+" // deletes schoolboy "+trim$(personausw$))
db ("putrec",0)
db ("pack")
db ("close",#3)
db ("open",#4,"C:\XProfanX2\Databases\"+trim$(personausw$)+".DBF")' opens The Own DB the Schülers
db ("use",#4)

Whilenot %dbEof

    satznr&= &dbreccount' amount Datensätze altogether
    db ("use",#4)
    db ("go","Top")

    If Satznr& > 0

        teacher$=db("Get","LEHRER")' fetch itself a Lehrernamen
        db ("open",#5,"C:\XProfanX2\Databases\"+trim$(teacher$)+".DBF")' opens The DB with the names the Lehrers
        db ("use",#5)

        whilenot %dbEof

            satznr2&=db ("seek","SCHUELER",personausw$,2)' seek whom names the Schülers

            if satznr2& > 0

                db ("delete")' deletes whom Datensatz
                db ("pack")
                db ("close",#5)

            Endif

            db("go","Next")

        endwhile

    Endif

    db("go","Next")

endwhile

db ("close",#4)

Would calm, if time someone drüberschauen could... I faith I schnall something at term the Loop not :O

Grüessli

danny
 
05/06/13  
 



« this Posting watts as Solution marked. »

- Page 2 -



Thomas
Freier
with the pcu ging's. If now but too with X2 possible his or täusche I?
 $H windows.ph
DECLARE MENU&,MENU2&
 $u DLGMENU.PCU=MENU.
WINDOWSTYLE 4+8
CLS
BUILDMENU2 %hwnd
BUILDMENU %hwnd
var menu%=1

WHILENOT (%KEY=2)

    WAITINPUT

    IF (ABS(%MENUITEM)=104) OR (ABS(%MENUITEM)=204)

        BREAK

    ENDIF

    If (ABS(%MENUITEM)=102)

        ~SetMenu(%hwnd,0)
        ~DrawMenuBar(%hwnd)
        ~SetMenu(%hwnd,menu2&)
        ~DrawMenuBar(%hwnd)

    ElseIf (ABS(%MENUITEM)=202)

        ~SetMenu(%hwnd,0)
        ~DrawMenuBar(%hwnd)
        ~SetMenu(%hwnd,menu&)
        ~DrawMenuBar(%hwnd)

    EndIf

WEND

END

PROC BUILDMENU

    PARAMETERS DLG&
    MENU&=MENU.NEW(DLG&)
    MENU.SETNICEBACKGROUND
    MENU.POPUP "&Datei"
    MENU.APPENDMENU 100,"New"
    MENU.APPENDMENU 101,"Öffnen"
    MENU.APPENDMENU 102,"Menü 2"
    MENU.APPENDMENU 104,"Beenden"

endproc

PROC BUILDMENU2

    PARAMETERS DLG&
    MENU2&=MENU.NEW(DLG&)
    MENU.SETNICEBACKGROUND
    MENU.POPUP "&Dokument"
    MENU.APPENDMENU 200,"Speichern"
    MENU.APPENDMENU 201,"Drucken"
    MENU.APPENDMENU 202,"Menü 1"
    MENU.APPENDMENU 204,"Beenden"

endproc


383 kB
Hochgeladen:05/10/13
Downloadcounter130
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
05/10/13  
 



 
- Page 1 -


Sorry, I know apparently not at all very which groin you mean.

Perhaps. time a Screenshot show, simply on Posting append.
 
05/08/13  
 




holmol93


Heyho

is correct, would have I strain of beginning on mitschicken can *g*

I faith neither, the it many gives, The these Possibility search

but How you see, distinguish itself according to the, which rights the user has, the Menu supra.
If I The my Logoutvorgang so einbaue, I simply the Menu new set up let, are to that part thereafter items twice. or one teacher, the itself einloggt, to the the headmaster eingeloggt was, has suddenly next to seinem Menu too yet grabbed aufs master oO

therefore möcht I The groin "Delete" and new initialisieren let

The items go over If- instructions from and eingeblendet. After the Motto, If right SoundSo present -> show "Funktionen.Master" etc...

Greetz,

danny

175 kB
Kurzbeschreibung: Screenshot the Menüleisten
Hochgeladen:05/08/13
Downloadcounter1126
Download
 
05/08/13  
 




Thomas
Freier
means for each group one own Menu? the could on one dialog his and then the Zutreffende overlay. or see [...] 
simply The Source once durchstöbern.
 
Gruß Thomas
Windows XP SP2, XProfan X2
05/08/13  
 




H.Brill
near siehste, now do you know too, what with database-Normalisierung
meant is.
If it one normales Menu is, could one still one complete
Menu Show and according to Rechten, with EnableMenu each
Auswahlpunkte deaktivieren or. enable.

so, now must I to work.
 
Benutze XPROFAN X3 + FREEPROFAN
Wir sind die XProfaner.
Sie werden von uns assimiliert.
Widerstand ist zwecklos!
Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.

Was die Borg können, können wir schon lange.
05/08/13  
 



 
- Page 2 -



E.T.
... or hold one externes Menu benefit...
... and then UseExtMenu...

there can beautiful between whom Menüs there- and since change
 
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
05/08/13  
 




holmol93
Hello together,

have time a couple Opportunities durchprobiert, but nothing functions so, as should

Überlegung is:
an person reports itself on and the Menu fit itself according to ihren Benutzerrechten on. the works.
what not works:
there's a Logoutfunktion, which a user new authentifiziert and the rights (too for Menu) new zuteilt.
If I the Menu thereafter simply once more new create, have I gewisse items twice, namely yet The from the Vorperson. power to the a couple time has one one 3-Zeiliges Menu...

Invisible and again overlay bring nothing, there everything one Menu is, in the gewisse "AppendMenu" spots with If-Then-Else ausgeblendet are. The stay at Wiedereinblenden in the equal status... means in the, from the person, which first thing announced has.

If I the Menu with Destroymenu(%HWnd) destroy, disappears it of course, but I can it thereafter not once more new loading (is by me a procedure.). Error Message: "Error at create the Menüs."

What can I do?

this is the only trouble, I of beginning on not solve could... now has my Program so far any functions what about me have the until Schluss postponed and brings simply not to that walk... it must still there ever a lane give, the bestehende Menu either once more new To loading without double and triple items or it To delete and once more integrally new To "definieren"...

I knows, my trouble is a Luxusproblem xD clear can I The exhaust simply "ausgrauen", but there's gewisse things, there would like I simply not, that someone, the no right has tappt im dunkeln To sehn, tappt im dunkeln sees and what bring it the schoolboy, if it too yet The items the teacher sees xD
 
05/10/13  
 



look time, you could The dlgmenu help:  [...]  -

of course already old but code is with.
 
05/10/13  
 




Thomas
Freier
with the pcu ging's. If now but too with X2 possible his or täusche I?
 $H windows.ph
DECLARE MENU&,MENU2&
 $u DLGMENU.PCU=MENU.
WINDOWSTYLE 4+8
CLS
BUILDMENU2 %hwnd
BUILDMENU %hwnd
var menu%=1

WHILENOT (%KEY=2)

    WAITINPUT

    IF (ABS(%MENUITEM)=104) OR (ABS(%MENUITEM)=204)

        BREAK

    ENDIF

    If (ABS(%MENUITEM)=102)

        ~SetMenu(%hwnd,0)
        ~DrawMenuBar(%hwnd)
        ~SetMenu(%hwnd,menu2&)
        ~DrawMenuBar(%hwnd)

    ElseIf (ABS(%MENUITEM)=202)

        ~SetMenu(%hwnd,0)
        ~DrawMenuBar(%hwnd)
        ~SetMenu(%hwnd,menu&)
        ~DrawMenuBar(%hwnd)

    EndIf

WEND

END

PROC BUILDMENU

    PARAMETERS DLG&
    MENU&=MENU.NEW(DLG&)
    MENU.SETNICEBACKGROUND
    MENU.POPUP "&Datei"
    MENU.APPENDMENU 100,"New"
    MENU.APPENDMENU 101,"Öffnen"
    MENU.APPENDMENU 102,"Menü 2"
    MENU.APPENDMENU 104,"Beenden"

endproc

PROC BUILDMENU2

    PARAMETERS DLG&
    MENU2&=MENU.NEW(DLG&)
    MENU.SETNICEBACKGROUND
    MENU.POPUP "&Dokument"
    MENU.APPENDMENU 200,"Speichern"
    MENU.APPENDMENU 201,"Drucken"
    MENU.APPENDMENU 202,"Menü 1"
    MENU.APPENDMENU 204,"Beenden"

endproc


383 kB
Hochgeladen:05/10/13
Downloadcounter130
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
05/10/13  
 




holmol93
hey IF&Thomas

Merci for Your Answer. will be it daheim strain time try

So I have Yes XProfan X2 but so is (so far I it check could) nothing
Vergleichbares possible... have rumprobiert and something's guaranteeing always schief gone...

I report tommorrow time drüber, whether it worked has

Greetz,

danny
 
05/10/13  
 




Thomas
Freier

So I have Yes XProfan X2 but so is (so far I it check could) nothing
Vergleichbares possible.


still. Wechselmenüs under 29.1.3 - CreateMenu, AppendMenu, SetMenu and DestroyMenu
 
Gruß Thomas
Windows XP SP2, XProfan X2
05/11/13  
 




E.T.

...
there's a Logoutfunktion, which a user new authentifiziert and the rights (too for Menu) new zuteilt.
...


means Logout  heist m.E., the the act. user abgemeldet and nobody More announced is. means user Log off, the Menu complete zestören and then in the program one standard - Menu with of/ one Login - function settle.

so How You the describe, is it sooner one "Benutzer wechseln". i think, there get The Menü's confusion. would be I sooner whom user complete Log off of Program, standard-Menu settle and ggf. with one klick on z.B. a Button "Benutzer wechseln"  same again a selection for reg. user offer.

And then the Menu according to Rechten again "zusammenbauen" and Show...
 
XProfan X2
Grüße aus Sachsen... Mario
WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte...
05/11/13  
 




holmol93
Hello together!

have my Menu on The alternative Possibility with the Unit adjusted... functions! I can the Menu anytime destroy and new set up, without Error Message! Genial.

@Mario,

Jap, very so understand I Logout really too I Have me initially on unserem Datenbanksystem in the deal orientiert, on the one itself only with a Password authentifiziert. once one on "Logout" goes, comes immediate one Logindialog, to that speedy Benutzerwechsel.
have it now though so adjusted, How You suggested have:
2 Menüs. one with all functions and functions go to Rechten displayed and ausgeblendet and one, what to one Logout displayed and is where one only The Options "Beenden" and "Anmelden" has.

working free from problems ;) so is now too finally The function "Als user ausgeben" possible become ;)

Gruess from Bern and yet a lovely Sonntagnachmittag!
 
05/12/13  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

21.653 Views

Untitledvor 0 min.
Manfred Barei10/08/23
Member 007717910/17/18
RudiB.08/27/18
Ernst06/01/16
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie