Martin Schreiber | 1 Dec 07:36 2010
Picon

Re: Dump MYSQL

On Tuesday, 30. November 2010 16.18:05 dan wrote:

> The output is stored in a memory stream, that can be used later to
> read the output into a TStringList. Any example use execmse like that?
>
You want to see the messages of the mysqldump program? Have a look into 
MSEide 'Target Console Window' or place a tterminal into a twidgetgrid 
(tab 'Edit') and run the program with ttermial.execprog().

Martin
Graeme Geldenhuys | 1 Dec 07:42 2010
Picon

Re: [OFF] Why everything is lower case?

Op 2010-11-30 21:05, Sieghard het geskryf:
> 
> That might depend on one's preconditions. But I can't challenge your
> statement.

Google searches about Dvorak experiences will reveal that many others have
had similar experiences to myself.

> Or so they say, yes. But Dvorak is _very_ different, and if one needs the
> key cap lettering to type, it's not easy to switch back and forth.

Some people switch back and forth between Qwerty and Dvorak. I just thought
that would be confusing, so changed all my systems I work on to use Dvorak
layout. I can't type Qwerty at all any more. :)

> keyboard a couple of times already because I "like" (am used to) its feel.
> There _are_ differences.

Exactly my point. :)

Regards,
  - Graeme -

--

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Christian Nobel | 1 Dec 09:57 2010
Picon

Re: Dump MYSQL

> No, Christian. Not about -p, First i tried, I have already know that. :)
> command is right, tempfile.sql isn't created (IMO, the table have a blob field).

AFAIK mysqldump couldn't care a less whether there are BLOB fields or
not, as all the dump does is to save the raw data.

But yes, there is a problem with APprocess and large files, I haven't
quite found why, as it behaves differently depending on the context.

I can not get it to work either with mysqldump, but if I process a large
picture with Ghostscript there is no problem - weird!

However I tried this instead of AProcess, and this works:

var
.
.
commandtext:string
S:longint;
begin
  commandtext:='mysqldump -h '+hostname+' -u '+username+' -p'
  +password+' '+database+' '+tablename+' > tempfile.sql';
  S:=fpsystem(commandtext);
end

However this does only work on Linux, and remember unix in your clauses.

/Christian

(Continue reading)

Martin Schreiber | 1 Dec 10:23 2010
Picon

Re: Dump MYSQL

On Monday 29 November 2010 16:34:25 dan wrote:

> I just have tried this code. but it doesn't success, the
> 'tempfile.sql' isn't created.
> When I make run.bat file, contains:
>
>  <at> echo off
> mysql -h localhost -u root -padmin test table1 < tempfile.sql
>
> It's worked when i set AProcess.CommandLine:= 'run.bat',
> but i don't want that, because the mysql password is in that run.bat file
> Note: table1 has blob field.
>
> How about execmse or execmse2 (Msegui), Martin? I have tried, but
> doesn't success too.
>
Isn't the '<' wrong and should be '>'? Input/output redirection with the 
exec*() procedures works on linux only. Suggestion: use the --result-file= 
switch:
http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_result-file

Martin
Christian Nobel | 1 Dec 10:46 2010
Picon

Re: Dump MYSQL

On 01-12-2010 10:23, Martin Schreiber wrote:

>> mysql -h localhost -u root -padmin test table1 < tempfile.sql

> Isn't the '<' wrong and should be '>'? 

No.

mysqldump -h localhost -u root -padmin test table1 > tempfile.sql

mysql -h localhost -u root -padmin test table1 < tempfile.sql

And actually the mysqldump command is excuted correctly, but for some
reason it stalls after approx 700 bytes.

/Christian

Christian Nobel | 1 Dec 10:47 2010
Picon

Re: Dump MYSQL

On 01-12-2010 10:46, Christian Nobel wrote:
> On 01-12-2010 10:23, Martin Schreiber wrote:
> 
>>> mysql -h localhost -u root -padmin test table1 < tempfile.sql
> 
>> Isn't the '<' wrong and should be '>'? 
> 
> No.
> 
> mysqldump -h localhost -u root -padmin test table1 > tempfile.sql
> 
> mysql -h localhost -u root -padmin test table1 < tempfile.sql
> 
> And actually the mysqldump command is excuted correctly, but for some
> reason it stalls after approx 700 bytes.
> 
> /Christian
> 
Small correction:

mysql -h localhost -u root -padmin test < tempfile.sql

the tablename is defined in the dumpfile.

/Christian

Martin Schreiber | 1 Dec 11:18 2010
Picon

Re: Dump MYSQL

On Wednesday 01 December 2010 10:23:45 you wrote:
>
> Isn't the '<' wrong and should be '>'?

Sorry I misread mysql for mysqldump.

Christian Nobel | 2 Dec 11:39 2010
Picon

dbdropdown with lookup - delete dropdown?

I have:

subprojamount:=lookupsource.dataset.recordcount;
tddsubprojname.dropdown.dropdownrowcount:=subprojamount;
lookupsource.dataset.first;
while not lookupsource.dataset.eof do
begin
tddsubprojname.dropdown.cols[0].add(lookupsource.dataset.fieldbyname('projsubid').asstring);
tddsubprojname.dropdown.cols[1].add(lookupsource.dataset.fieldbyname('projsubname').asstring);
lookupsource.dataset.next;
end;

Works fine first time, but second time only on line is shown in the
dropdown, end next time even only a half or other strange behavior.

I think that it all depends on that the dropdown is not cleared/erased,
and then I thought it was something like:

tddsubprojname.dropdown.clear (or delete)

But no, so what to do?

Do I need to mention again that code completion would probably given me
the answer?

Tnx
Christian

Christian Nobel | 2 Dec 11:47 2010
Picon

Re: dbdropdown with lookup - delete dropdown?

Played (guessing) around, and found out that the syntax is:

tddsubprojname.dropdown.cols.clear

But not to be rude, I stand by my rant about the code completion.

In my wiev it is the only thing missing for making MSE the most perfect
programming tool what so ever :-)

/Christian

Martin Schreiber | 2 Dec 11:56 2010
Picon

Re: dbdropdown with lookup - delete dropdown?

On Thursday, 2. December 2010 11.39:20 Christian Nobel wrote:
> I have:
>
> subprojamount:=lookupsource.dataset.recordcount;
> tddsubprojname.dropdown.dropdownrowcount:=subprojamount;
> lookupsource.dataset.first;
> while not lookupsource.dataset.eof do
> begin
> tddsubprojname.dropdown.cols[0].add(lookupsource.dataset.fieldbyname('projs
>ubid').asstring);
> tddsubprojname.dropdown.cols[1].add(lookupsource.dataset.fieldbyname('projs
>ubname').asstring); lookupsource.dataset.next;
> end;
>
The tdbdropdowneditdb or tdbenumeditdb does this, there is no need to build 
dropdown list filling in code?

> Works fine first time, but second time only on line is shown in the
> dropdown, end next time even only a half or other strange behavior.
>
> I think that it all depends on that the dropdown is not cleared/erased,
> and then I thought it was something like:
>
> tddsubprojname.dropdown.clear (or delete)
>
> But no, so what to do?
>
 tdropdowncols = class(townedpersistentarrayprop)
[...]
  public
(Continue reading)


Gmane