Autor Beitrag
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: So 27.07.03 19:35 
Hi,
ich ahbe da ein Problem. Ich möchte ein MySQL Tool progarmmieren. Damit man eine datenbank erstellen kann, ruft man normalerweise das proggi mysql.exe über die command line auf. Und gibt ein
Code:
create database TEST;
.
Ich rufe diese MySQl.exe mit Shellexecute auf. Nun möchte ich das
Code:
create database TEST;
nach der Ausführung des Porggis dort ausgeführt wird. Es soll den gleichen Effekt haben wie als wenn ich den oben erlauterten Schritt mache. Mit Parameter wie z.B. -create oder ähnlcihen ging e snicht. Wie stelel ich das an. Bin wirklich ratlos.

thx
DeCodeGuru
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1333
Erhaltene Danke: 1

Arch Linux
Eclipse
BeitragVerfasst: So 27.07.03 19:48 
ich glaube nicht, dass man das so einfach hinbekommt. Wesentlich einfacher wäre es, eine MySQL-Kompo zu verwenden. Speziell für die Interessant, die über keine BDE o.ä. verfügen. Such mal bei Torry. Ich verwende TMySQLDataSet.

_________________
Viele Grüße
Jakob
Killian
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 24

Windows XP, Debain, Fli4l Router
Delphi 7 Professional
BeitragVerfasst: So 27.07.03 21:22 
Also ich habe mal sowas wie "phpMyAdmin" (kennt wahrscheinlich jeder) in Delphi geschrieben und kann die nur MySQL Komponenten empfehlen...ich schaui gleich nochmal anch welche ich benutzt habe und schreib es hier rein. Bei Torry ist auf jedenfall schonmal ein gute Tip.

Gruss Killian

PS Die Komp heisst Direct Mysql Objects 1.1

_________________
TND Design - We move the world
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Mo 28.07.03 07:06 
Wenn du mit den richtigen Versionen (keine Alpha, Beta, Gamma) von MySQL arbeitest kann ich die ZeosLibs empfehlen.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
Andreas L. Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Mo 28.07.03 09:05 
Danke für eure Antworten, werde mir das mal anschauen.
Thunder00
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 52



BeitragVerfasst: Mo 28.07.03 17:29 
Moin Vielleichht kann ich dir damit weiterhelfen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
Procedure Tform1.Button1Click(Sender:Tobject);
begin
  ShellExecute(0
               Nil
               PChar('C:\Programm.exe'), 
               Pchar('-Parameter'),    <-- Hier kommen anscheinend die Parameter rein 
               Pchar('C:\StartDir'),    <-- Und hier das Verz., wo es ausgeführt werden soll
               SW_NORMAL);
End;

is ausm EDH2000

_________________
If you can't make it good, at least make it looks good. (Bill Gates)
marcme
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Mi 06.08.03 16:21 
Hallo!

Der letzte Beitrag ist zwar schon ein weilchen her aber vielleicht hilft es jemandem anderem.

Mysql kann man auch im sog. Batch Mode benutzen. Man erzeugt einfach eine Textdatei in die die jeweiligen Befehle nacheinander aufgeführt werden.

Z.B.

CREATE DATABASE test;
USE test;

MySql wird dann so aufgerufen:

mysql -h host -u user -p < stapel-datei

Gruß
Marcus