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. »


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
Downloadcounter132
Download
 
Gruß Thomas
Windows XP SP2, XProfan X2
05/10/13  
 




Thomas
Freier
I try it once.
Please always only success delete. Seek end at last Datensatz and ought to nothing found go, Why too always, becomes the last Datensatz in each entrapment deleted.
CompileMarkSeparation
db ("open",#1,dbuserdata$)' öffnet die Benutzerdatenbank
db ("use",#1)
db ("seek","USERNAME",personausw$,2)' sucht den Namen des Schülers
db ("delete")' löscht ihn
db ("pack")
db ("close",#1)

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

if satznr2& > 0

    db ("delete")' deletes whom Datensatz
    db ("pack")

Endif

db ("close",#5)

The problem is sure in this part
CompileMarkSeparation
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


it should well n-time the schoolboy at teacher sought go. it'll but to the 1. Fund The #5=Lehrer.dbf closed. there power The While-Loop none sense.
should but sure More found go, then the Fund only db ("delete")' deletes whom Datensatz and to endwhile The as deleted marked Datensätze for good deletedb ("pack") and data base close.
 
Gruß Thomas
Windows XP SP2, XProfan X2
05/06/13  
 




H.Brill
How I it so at Darüberfliegen your Codes
so see, must You
CompileMarkSeparation
@db("Go", "Top")
>

to the Loop perform. the must not your Loop.
i think time, that the data still in memory stand.
CompileMarkSeparation
Whilenot %dbEof

    satznr&= &dbreccount' Anzahl Datensätze insgesamt
    db ("use",#4)
    db ("go","Top")  --> das muß vor die Schleife

i'd it time so try :
CompileMarkSeparation
@db("Go", "Top")

Whilenot %dbEof

    The Datensätze, The @db("Seek",...) finds, in one aray or
    Listbox . Leave &dbRecNo supply Yes then whom found set.
    then with db("Delete",... ) delete.
    @db("Go", "Next")

EndWhile


now with @db("Pack", ) delete, DB close and new open.
now should The DB currently his. i know neither, How sure %dbEof
in 2 creep operates. You müßtest but in eachone DB too one sogen.
Schlüsselfeld having, so one into others DBs then too The
suitable Deleting Entries can. there reicht already one simple
num. area, the ascending each Datensatz numeriert.
there missing but XProfan one Join - commands moreover. there would hold SQL rather suitable.
 
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/07/13  
 




H.Brill
have supra time accurate red.
there would the Topic data base-Nomalisierung important.
are The DBs you pretended or have you got tappt im dunkeln new
prepares ?
circa Datenredundancen To bypass, could one consider,
The DBs something umzugestalten. z.B. teacher -> several schoolboy
schoolboy would then one Memo, in the as Textzeilen then
The schoolboy among themselves stand. with MoveListToMem or
MoveListToStr or Listboxliste directly can very beautiful
The list copy and therein search,delete or Edit.
Evtl. could one too Structures with reaches# benefit.
with the DB the teacher (class, schoolboy, case)
z.B. : Struct teacher = class$(5), case$(20), Schueler#(400)
the wären 20 schoolboy with apiece 20 characters

Perhaps help you such Überlegungen something moreover.
 
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/07/13  
 




holmol93
Hello together

Merci first, that your you the Topic adopted have.

@H.Brill,

your last Posting has me To think given. and as i The 2 Solutions ausprobiert have and both me not integrally to that target led having, is it me How tomatoes from the eyes fallen:
WIESO had I The Schülernamen in the teacher DB take off, if still The Schülernamen, velvet yours zugeordneten class already in the DB File with the Benutzerdaten lying oO
it yields plenty More sense, in the teacher DB simply "FACH" and "KLASSE" to take off and the Schülernamen the class parallel from the user DB File To fetch... at that Delete one User from the BenutzerDB File disappears it means too from whom Ansichten the teacher voila... and a benefit bringts yet: If one The Schülerdaten edited and the schoolboy a new class zuweist, must the only user DB File occur and it alights automatically with its "neuen" Fachlehrern. otherwise had one ditto yet Changes into Lehrerfiles distinguished must...

is now adjusted and runs lovely... question me only, wieso I there not at the outset on it come be...

be hold yet Beginner on the area and vorallem in reference on Databases

in the Grunde found I Rechteverwaltungen tensive, there our system in the deal on Access Aufsetzt and a very detailed Rechteverwaltung has, and wished such a thing too once program xD and so is really The idea the Schulverwaltung emerged, in the one The rights ditto flexibly zuteilen can

Merci plenty plenty time for Your Help

... And if I another question to put might, without one new Topic eröffnen To must... How sounds the commands around the Menüleiste To "zerstören", so one tappt im dunkeln thereafter new call can?

Greeetz,

danny
 
05/08/13  
 



Hi!

Dou you mean Perhaps windowstyle 16 ?
 
05/08/13  
 




holmol93
Hallöchen To so later hour

not integrally by the Rechteverwaltung stand gewisse Menüs and items only Personen available, The this to be right.
is too no trouble, if to the Program each time neustartet, if itself another user anmeldet.
i want but a Login/Logout function install... and each time if I simply a new Passwortabfrage make and the program The rights zuteilt and the Menüleiste loading becomes these then twice displayed or contains items of Vorbenutzer, The the new not having ought to

for Window Gibts Yes DestroyWindow, there something ähnliches too for groin supra, so one tappt im dunkeln delete and new set up can without that items twice attend?

Greetz,
danny
 
05/08/13  
 



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
Downloadcounter1146
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  
 




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  
 




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.928 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