Forum | | | | Dietmar Horn | Hello together,
I work z.Z. on "XProfan kinderleicht", part 3: "SQL with Firebird". it may be, I this 3. part evtl. yet in the october weitestgehend ready get.
now be I me but not sure, which Firebird-Files one one finished Program at least enclosing must, so it on PCs runs, The yet never something of Firebird heard and seen having, and as under windows 7/8 (32 and 64 bit) functions (or not functions).
The demonstration-Source lying with, and The of XPSE generierte ENH-File. XPSE shining on the code nothing auszusetzen to have, I already time as positively feel. CompileMarkSeparationDeclare e%,i%,x%,y%
Declare tmp$
Declare exit&,hGrid&
Declare Autor$,Titel$,Preis$,Datum$
x% = 510
y% = 185
DEF ___GSM(1) !"USER32","GetSystemMetrics"
DEF CaptionX(1) @%(1) + ___GSM(7) * 2
DEF CaptionY(1) @%(1) + CaptionX(0) + @___GSM(4)
DEF CenterX(1) %MaxX / 2 - CaptionX(@%(1) / 2)
DEF CenterY(1) %MaxY / 2 - CaptionY(@%(1) / 2)
Def GetSysColor(1) !"USER32","GetSysColor"
Var fbDLL& = db("fbUseDLL","fbclient.dll")
declare sql$,hdb&
ifnot fileexists("Buecherliste.fdb")
hdb& = db("fbCreate", "SYSDBA", "masterkey", "Buecherliste.fdb")
Set("Errorlevel",-1)
sql$="DROP TABLE BUECHER"
db("fbSQLExec",hdb&,sql$, 1)
Set("Errorlevel",0)
db("fbSQLExec", hdb&, "CREATE TABLE BUECHER \
( AUTOR VarCHAR(20),\
TITEL VARCHAR(50),\
PREIS NUMERIC(2,2),\
DATUM DATE )",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Dietmar Horn','Das Große XProfan-Lehrbuch',20.00,'01.03.2008')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Dietmar Horn','XProfan kinderleicht: Einführung',10.00,'01.01.2012')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Dietmar Horn','XProfan kinderleicht: dBase-Tabellen',10.00,'01.03.2012')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Dietmar Horn','XProfan kinderleicht: SQL-Datenbanken mit Firebird',10.00,'21.10.2012')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Dietmar Horn','Tabellenkalkulation kinderleicht mit Open-Office',9.70,'01.08.2012')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Roland G. Hülsmann','XProfan für alle',29.90,'01.12.2003')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Rolf Koch','ROC - der Fensterhelfer für XProfan',19.95,'01.02.2006')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Lothar Beloch','Tabellenkalkulation kinderleicht mit Open-Office',9.70,'01.08.2012')",1)
db("fbSQLExec",hdb&,"INSERT INTO BUECHER (AUTOR,TITEL,PREIS,DATUM) \
VALUES ('Lothar Beloch','BWL mit anderen Worten',9.10,'01.01.2012')",1)
Else
hdb& = db("fbInit", "SYSDBA", "masterkey", "Buecherliste.fdb")
endif
Proc Fenster
WindowStyle 48 + 8 + 512 + 2
WindowTitle "Autoren- und Büchertabelle"
Window 5 * %MaxX + CenterX(x%),CenterY(y%) - CaptionX(x%),CaptionY(y%)
UseIcon "COMPUTER"
UseFont "Arial",16,0,0,0,0
SetDialogFont 1
CLS GetSysColor(15)
tmp$ = "Autor;0;115;Titel;0;275;Preis;2;45;Datum;0;70"
hGrid& = Create("Gridbox",%HWnd,tmp$,0,0,0,Width(%HWnd),Height(%HWnd)-35)
Read_FDB
exit& = Create("Button",%HWnd,"Beenden",(Width(%HWnd) - 100) / 2,Height(%HWnd) -30,100,25)
EndProc
'#####################################################################
Fenster
SetWindowPos %HWnd = CenterX(x%),CenterY(y%) - CaptionX(x%),CaptionY(y%);0
SelectString(hGrid&,0,"")
Clear e%
WhileNot e%
Waitinput
If Clicked(exit&) or (%Key = 2)
e% = 1
EndIf
EndWhile
db("fbDone",hdb&)
FreeDll fbDLL&
End
Proc Read_FDB
Clearlist
db("fbSQLExec",hdb&,"SELECT * FROM BUECHER ORDER BY TITEL",1)
i% = 2
While i% < %GetCount + 1
Autor$ = SubStr$(GetString$(0,i%),1,"|")
Titel$ = SubStr$(GetString$(0,i%),2,"|")
Preis$ = SubStr$(GetString$(0,i%),3,"|")
Datum$ = SubStr$(GetString$(0,i%),4,"|")
AddString(hGrid&,Autor$ + "|" + Titel$ + "|" + Preis$ + "|" + Datum$ + "|")
inc i%
EndWhile
EndProc
[DOWNLOAD]http://dl.XProfan.com/?aiiui/buecherliste.zipper[/DOWNLOAD]
currently entwickele I with XProfan X2 and Firebird 2.5. embedded under Windows XP.
because at first Program Start The data base buecherliste.fdb laid out becomes, must the program on the Installationsordner with Schreibrechten grab can.
About Tests and Notes to the Tests would I forward.
Greeting Dietmar |
| | | Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V. [...] Windows 95 bis Windows 7 Profan² 6.6 bis XProfan X2 mit XPSE Das große XProfan-Lehrbuch: [...] | 09/29/12 ▲ |
| |
| | Jörg Sellmeyer | means my PC has yet never too only whom breath one Kontaktes with Firebird had (anyway would I me which not deliberate). same with this row there then too a kommentarlosen crash with Schutzverletzung: CompileMarkSeparationhdb& = db("fbCreate", "SYSDBA", "masterkey", "Buecherliste.fdb") > the was, before I seen have, that a zipper-File with further Files beiliegt. too after I The runtergeladen Have and the program launched have, becomes not much better. it'll the are missing of/ one "icuu30.dll" bemängelt. subsequently crashes the program on the equal place ex. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 09/29/12 ▲ |
| |
| | Dieter Zornow | i think time You need absolutely these Files fbclient.dll firebird.msg ib_util.dll icudt30.dll icuuc30.dll so runs it by me. You need Yes only your Program in some directory To copy and the Exe to start, then says it to you what missing. the can itself naturally version of To Version of Firebird Change, with your works but with the obigen Files. |
| | | XProfan X2Er ist ein Mann wie ein Baum. Sie nennen ihn Bonsai., Win 7 32 bit und Win 7 64 bit, mit XProfan X2 | 09/29/12 ▲ |
| |
| | Dietmar Horn | I thanks you both. the ZIP-archive have I to Dieters allude updated. who would like, the can it itself of here download: [...]
the Program I had naturally in a others Ordner copies, but it shining itself by me whom remainder nevertheless of installierten FB To fetch.
Greeting Dietmar
whom Link in the Ausgangsposting wished I aktualiseren, still it works not. always if I in the Editiermodus on New hochladen" click, then jumping the Cursor in that Antwortenfeld the last Beitrages. |
| | | XProfan X2Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V. [...] Windows 95 bis Windows 7 Profan² 6.6 bis XProfan X2 mit XPSE Das große XProfan-Lehrbuch: [...] | 09/29/12 ▲ |
| |
| | Jörg Sellmeyer | now works it and the program launch anstandslos. |
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 09/29/12 ▲ |
| |
| | Dietmar Horn | thanks, Jörg, for your feedback!
Greeting Dietmar |
| | | XProfan X2Multimedia für Jugendliche und junge Erwachsene - MMJ Hoyerswerda e.V. [...] Windows 95 bis Windows 7 Profan² 6.6 bis XProfan X2 mit XPSE Das große XProfan-Lehrbuch: [...] | 09/29/12 ▲ |
| |
|
AnswerThemeninformationenthis Topic has 3 subscriber: |