| |
|
|
| dbHelper.pcu
These Unit is for >= XProfan 10 Namensräume go supported (z.B: db.) and should uses go!
The Hauptaufgabe this Unit is the create and Remove of/ one DSN circa OnTheFly by ODBC on Databases grab to, without these by the user arrange To let.
Desweiteren is it possible a vain Access-data base to create, circa these moreover To benefit (DSN becomes automatically laid out)
Examples and further functions go follow!
a couple standard-coachman names find itself in the dbHelper.ph
Funktionsbeschreibung: (take db. as Namensraum in the Description) bracket clinging mark optionale Parameter Defaultwerte: User$ = Password$ = coachman$ = Microsoft Access coachman (*.mdb)
DSN$ = Db.AddDSN (DataBaseName$, [User$, [Password$, [coachman$]]]) Fügt a DSN-Sign in whom Benutzerdatenquellen one DSN$ is in the Fehlerfalle one Leerstring, otherwise can this String for further command the XProfan ODBC-interface uses go!
Result% = db.RemoveDSN(DSN$, [coachman$]) removes DSN-entry from whom Benutzerdatenquellen Result% is 1 in the erfolgsfalle, otherwise 0
DSN$ = db.CreateMDB(DataBaseName$, [User$, [Password$]]) prepares a vain Acces-Database and fügt a DSN-entry hinzu
PS: The DSN-names go prepares from XPRF + Datenbankname without way and Extension
Feedback, Bugmeldungen etc. erwünscht
If the a or others another couple Examples create would, would very nice |
|
|
| |
|
|
|
| Have the example from the Using s. quick sometimes added to create the database (example1.mdb), as well as display. DSN becomes on the fly prepares and deleted CompileMarkSeparation### hinzugefügt
$U dbHelper.pcu = db.
Declare DSN$
DSN$ = db.CreateMDB(Beispiel1.mdb)
If DSN$ = : End : EndIf
### ende
-Begin-----------------------------------------------------------------
-VariablesDeclaration------------------------------------------------
Declare hDb&
Declare MemoFeld$
-Main----------------------------------------------------------------
### geändert
hDb& = @SQLInit(DSN=Microsoft Access-Datenbank)
hDb& = @SQLInit(DSN= + DSN$)
### ende
If hDb&
-Tabelle erzeugen------------------------------------------------
-
- AUTOINCREMENT = Autowert
- CHAR = Text
- CURRENCY = Waehrung
- DATE = Datum/Uhrzeit
- FLOAT = Double
- INT = Long Integer
- MEMO = Memory
- NUMBER = Double
-
-----------------------------------------------------------------
SQLExec CREATE TABLE test1 (Nummer AUTOINCREMENT, +
Name CHAR(50) PRIMARY KEY, +
Vorname CHAR(30), +
GebDatum DATE, +
Groesse INT, +
Gehalt CURRENCY, +
Faktor FLOAT, +
Bemerkung MEMO);, 0
-Einen Datensatz anlegen-----------------------------------------
MemoFeld$ = Dies ist ein Memo-Feld in dem eine Menge Text +
gespeichert werden kann und das fast keine +
Grenzen kennt.
SQLExec INSERT INTO test1 (Name, Vorname, GebDatum, +
Groesse, Gehalt, Faktor, +
Bemerkung) +
VALUES (Schnell, +
Stefan, +
#6/16/1964#, +
189, +
3141.59, +
2.473, +
:MemoFeld$);, 0
-Datensaetze anzeigen--------------------------------------------
SQLExec SELECT * FROM test1;, 1
### hinzugefügt
@ListBox$(TABLE, 2)
### ende
-Tabelle loeschen------------------------------------------------
SQLExec DROP TABLE test1;, 0
SQLDone
EndIf
### hinzugefügt
db.RemoveDSN(DSN$)
WaitKey
### ende
-End-------------------------------------------------------------------
class=s4 href='./../../function-references/XProfan/end/'>End
|
|
|
| |
|
|
|
| Update on Beta 0.2 some Syntaxänderungen, see erstes Posting example added |
|
|
| |
|
|
|
Michael Wodrich | Werds in the running of the day test times. Can itself there too nothing zerschiessen, if something removes?
not the there hereafter important Entries are missing... |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/01/06 ▲ |
|
|
|
|
| Michael Wodrich
Werds in the running of the day test times. Can itself there too nothing zerschiessen, if something removes?
not the there hereafter important Entries are missing...
removes only DSN-Entries The with XPRF begin. means should it only of Program erstellte his. If You however a Access DB Namens Test.mdb and a Excel scheduler Test.xls having, so überschreiben which.
one ought to So the DSN Program Start produce and end endfernen, might then nothing occur, as long as one not gleichnamigen Databases paralell operates, with this PCU!
DSN-Entries are in general not important, can anytime In the Control Panel new lay out. (only Benutzerquellen go using, no system-DNS etc.!)
would be beautiful, if you time testest |
|
|
| |
|
|
|
| Update on Beta 0.3
PCU size optimiert (70%) and speed enhanced |
|
|
| |
|
|
|
Michael Wodrich | Access to Access works, but How I get Access to a MySQL-File? |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/01/06 ▲ |
|
|
|
|
| [quote:817fe34677=Michael Wodrich]Access to Access works, but How I get Access to a MySQL-File?[/quote:817fe34677] MyODBC must installs his, as address then z.B. whom localhost indicate. (127.0.0.1) and coachman = MySQL ODBC 3.51 coachman Habs but not yet tested, ought to but weg, if MySQL pub runs |
|
|
| |
|
|
|
| Update Beta 0.5
any 3 function having now a additional optionalen Parameter. If this on 1 staid is, becomes the DSN-Sign in whom Systemdatenquellen prepares, or. deleted. there having too others User the Systems grabbed on The DB
PS: who some nice Examples post could, the sustain of me by PM whom Source, the but not relayed go must. means dive in |
|
|
| |
|
|
|
Michael Wodrich | XAMPP has whom MyODBC well not used. The driver is by me not at all installs, fetch I straight to.
white someone where with XP Home The hosts. and lmhosts. very hingehören so tappt im dunkeln correctly ausgewertet go? I have on my system difficulty with the localhost indicated - The lead constantly in that vain. I help me with 127.0.0.1.
The Templates lying under WindowsSystem32Driveretc hosts.sam and lmhosts.sam.
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/04/06 ▲ |
|
|
|
|
| After system32/Drivers/etc only rename, means extension lane
MySQL goes too without ODBC, because one The DLL libmysql.dll directly uses. but for ODBC is MyODBC necessary! |
|
|
| |
|
|
|
Michael Wodrich | I schaff it simply not. Access-Files no trouble but MySql will not. or have I with *.myd The incorrect File on the roll.
there are *.myd, *.myi, *.frm to selection. d=datenbank, i=index ?!!
prepares have I The data base How always: with phpMyAdmin - so work I really only. but one Programmzugriff via XProfan would naturally well...
Best wishes Michael Wodrich |
|
|
| Programmieren, das spannendste Detektivspiel der Welt. | 10/04/06 ▲ |
|
|
|