Re: [lazarus] Trouble with postgres

2008-02-06 Thread Joost van der Sluis
Op woensdag 06-02-2008 om 10:16 uur [tijdzone +0200], schreef Alex du
Plessis:
 Vincent Snijders wrote:
  Alex du Plessis schreef:
  I certainly did - and in the library file directory one only finds 
  the libpq.a file no libpq.dll
 
 
  That is a bit strange. Did previous version install a dll?
 
  Vincent
 
  _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
 
 No, also a .a file.  I tried a couple of previous versions and they all 
 seem to have a similar problem.  I also get no reply from the postgres 
 mailing list when posing the same question/problem.

I've downloaded postgres for windows, and it does contain the libpq.dll
file. You'll have probably done something wrong. (Maybe the installer
doesn't install this client by default, and you didn't checked it?)

http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fbinary%2Fv8.3.0%2Fwin32%2Fpostgresql-8.3.0-2-binaries-no-installer.zip

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Perl-script in lazreport documentation

2008-02-01 Thread Joost van der Sluis
Hi all,

Is this file: lazarus/components/lazreport/doc/cvs2cl.pl really
necessary? Wasn't it used once and can it be removed now?

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] sqldb query parameter properties not loaded?

2008-01-31 Thread Joost van der Sluis
Op donderdag 24-01-2008 om 20:56 uur [tijdzone +1100], schreef John:
 Joost van der Sluis wrote:
  Op donderdag 24-01-2008 om 00:09 uur [tijdzone +1100], schreef John:

 Snip
  It does, in so far as the parameter specs are now retained, but now the 
  database property of sqlquery is not read, so it still can't work 
  properly.  In fact, I can't even set the database from the Lazarus 
  object inspector.
  
 
  Huh? Are you sure? Did you recompile everything correclty?

 You won't often catch me saying Yes I am *sure* I compiled everything 
 correctly !  I think I did, though.

Quick test is to add a new writeln, see if it is triggered. If so you
have rebuild it properly.

 This is my version of set database:

It doesn't contain a call to Inherited.SetDatabase. I think that that is
your problem now.

 procedure TCustomSQLQuery.SetDatabase(Value : TDatabase);
 
 var db : tsqlconnection;
 
 begin
   if (Database  Value) then
 begin
 {$IFDEF DBDEBUG}
 if dbdbgOn then
   Writeln(dbdbg, 'TCustomSQLQuery.database is being set to ',
  Value.DatabaseName, '.');
 {$ENDIF}
 if assigned(value) and not (Value is TSQLConnection) then
   DatabaseErrorFmt(SErrNotASQLConnection,[value.Name],self);

Add   '  inherited setdatabase(value);'


 if not (csLoading in ComponentState) then
   begin
   UnPrepare;
   if assigned(FCursor) then 
 TSQLConnection(DataBase).DeAllocateCursorHandle(FCursor);
   db := TSQLConnection(Value);
   if assigned(value) and (Transaction = nil) and 
 (Assigned(db.Transaction)) then
 transaction := Db.Transaction;
   {$IFDEF DBDEBUG}
   if dbdbgOn then
 Writeln(dbdbg, 'Calling TCustomSQLQuery.OnChangeSQL because ',
'TCustomSQLQuery.database has been set to ',
Value.DatabaseName, '.');
   {$ENDIF}
   OnChangeSQL(Self);
   end;
 end;
 end;

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [SPAM] Re: [lazarus] why do delphi users hate lazarus so much?

2008-01-30 Thread Joost van der Sluis
Op dinsdag 29-01-2008 om 11:11 uur [tijdzone +0100], schreef willem:
 Joost van der Sluis wrote:
 
  Personally I would rank debugger way higher on my wishlist than packages.

  That won't work. DDD is a frontend to GDB. And guess where the problem
  is? The problem is GDB.
 

 Can you tell me more about the problems with GDB ?

Well, what are you problems with the Lazarus debugger? Those are the
problems with GDB. (Almost)

Biggest problem is dat is doesn't support pascal-class-style properties,
that the DWARF support is limited. That it's not very stable/usefull in
Windows/Cygwin envirionments. That it's not available at all at win64.
(since there's no gcc for win64)

GDB's is most suitable to debug GNU/gcc applications on Unix systems.

Pascal and windows are supported, but very limited since most GDB
developers don't use those platforms and are not really interested in
them.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [SPAM] Re: [lazarus] why do delphi users hate lazarus so much?

2008-01-29 Thread Joost van der Sluis
Op dinsdag 29-01-2008 om 03:03 uur [tijdzone +0100], schreef willem:
 Marco van de Voort wrote:

  Personally I would rank debugger way higher on my wishlist than packages.

 Yes I agree with you that a debugger is important.
 I am thinking of porting DDD to Lazarus.

That won't work. DDD is a frontend to GDB. And guess where the problem
is? The problem is GDB.
Lazarus also has a frontend to gdb, and I think the lazarus-frontend is
better then DDD. So Porting DDD seems quite useless.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DBImage patch

2008-01-27 Thread Joost van der Sluis
Op zondag 27-01-2008 om 16:18 uur [tijdzone +0100], schreef Michael Van
Canneyt:
 Secondly:
 In general, the TDBImage should be more flexible about the kind
 of data it expects: it now requires that the first part of the 
 blob stream is an ansistring with the extension of the image. 
 This is of course not true unless the image was saved by TDBImage 
 itself, but is not correct for other, legacy, data. For instance,
 the Borland TDataset writes a TGraphicHeader record to the stream
 before the actual image data (guess how I found out).

I wrote the current behavior, because it didn't work at all. So I came
up with this idea, since i wasn't aware of the precise header that
Delphi uses.

 I think that this can be easily fixed by adding an event handler
 'OnGetImageFormat' to TDBImage, which, if set, should return this 
 ansistring; if it is not set, the current behaviour remains. 
 Similarly, an 'OnSetImageFormat' will write the type to the 
 stream (if a write is needed at all).
 
 I think this is a simple change, and if the Lazarus devels agree,
 I can create a patch for it.

Go ahead offcourse although you should ask a lazarus-developer to commit
it. ;)

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] sqldb query parameter properties not loaded?

2008-01-23 Thread Joost van der Sluis
Op woensdag 23-01-2008 om 10:28 uur [tijdzone +1100], schreef John:
 John wrote:
  Hi,
 
  Environment: win32, Lazarus SVN 13347, fpc SVN 9468
 
  In Lazarus, I have a simple query that uses a parameter:  select * 
  from test_cld where code = :code;
  I am defining it at design time using the object inspector. I set the 
  property parameters to ftString and ptInput, save everything, and 
  close the form, and open it again.
 
  If I view the lfm source, it get:
 
 Params = item
 DataType = ftString
 Name = 'code'
 ParamType = ptInput
   end
 
  as expected, but in the object inspector, the datatype and Paramtype 
  are back to ftUnknown and ptUnknown.
 
  Further, even if I fix them and run the app, I get an error 'unknown 
  field type for parameter code', which implies that the same thing is 
  happening.  (With the correct values in the parameter I can open the 
  query at design time).
 
  I can't find any reference to this in mantis - has anyone else had the 
  problem ?
 I posted this about a month ago.  After much tracing, adding debug 
 lines, (and general chasing of wild geese,) it appears to me that the 
 following is happening:

 (So far so good)
 
 At the end of TReader.ReadData for the form, DoFixupReferences is called. 
 This sets the database to which the SQLQuery is attached by calling 
 TCustomSQLQuery.SetDatabase, which:
 Calls TCustomSQLQuery.OnChangeSQL, which:
 Calls Fparams.ParseSQL(FSQL.Text,True, ,psInterbase)
 
 However, the second parameter, true tells Fparams.ParseSQL to 
 DoCreate, which means dropping all the existing parameters and 
 recreating them from the sql text.  This means that the param field type 
 is lost, as the new parameters are created with  ftUnknown.

Can you try if the attached patch fixes this?

 (Note also that the parameters are always created as psinterbase type 
 params.  I am not sure if this causes a problem, as it may be 
 overwritten somewhere, but it looks strange as there is a 'case' in 
 ParseSQL to cover the different types of parameter styles.)

That's no problem, since the parameter style is only used to re-write
the query in a format which the db-engine understands. The call to
ParseSQL in OnChangeSQL doesn't use this result from the ParseSQL
function. (The code is runned, though. So there is room for a
optimization here)

Joost.
Index: sqldb.pp
===
--- sqldb.pp	(revision 9878)
+++ sqldb.pp	(working copy)
@@ -773,13 +773,16 @@
 begin
 if assigned(value) and not (Value is TSQLConnection) then
   DatabaseErrorFmt(SErrNotASQLConnection,[value.Name],self);
-UnPrepare;
-if assigned(FCursor) then TSQLConnection(DataBase).DeAllocateCursorHandle(FCursor);
-db := TSQLConnection(Value);
 inherited setdatabase(value);
-if assigned(value) and (Transaction = nil) and (Assigned(db.Transaction)) then
-  transaction := Db.Transaction;
-OnChangeSQL(Self);
+if not (csLoading in ComponentState) then
+  begin
+  UnPrepare;
+  if assigned(FCursor) then TSQLConnection(DataBase).DeAllocateCursorHandle(FCursor);
+  db := TSQLConnection(Value);
+  if assigned(value) and (Transaction = nil) and (Assigned(db.Transaction)) then
+transaction := Db.Transaction;
+  OnChangeSQL(Self);
+  end;
 end;
 end;
 


Re: [lazarus] sqldb query parameter properties not loaded?

2008-01-23 Thread Joost van der Sluis
Op donderdag 24-01-2008 om 00:09 uur [tijdzone +1100], schreef John:
 Joost van der Sluis wrote:
  Op woensdag 23-01-2008 om 10:28 uur [tijdzone +1100], schreef John:

  John wrote:
  
  Hi,
 
  Environment: win32, Lazarus SVN 13347, fpc SVN 9468
 
  In Lazarus, I have a simple query that uses a parameter:  select * 
  from test_cld where code = :code;
  I am defining it at design time using the object inspector. I set the 
  property parameters to ftString and ptInput, save everything, and 
  close the form, and open it again.
 
  If I view the lfm source, it get:
 
 Params = item
 DataType = ftString
 Name = 'code'
 ParamType = ptInput
   end
 
  as expected, but in the object inspector, the datatype and Paramtype 
  are back to ftUnknown and ptUnknown.
 
  Further, even if I fix them and run the app, I get an error 'unknown 
  field type for parameter code', which implies that the same thing is 
  happening.  (With the correct values in the parameter I can open the 
  query at design time).
 
  I can't find any reference to this in mantis - has anyone else had the 
  problem ?

  I posted this about a month ago.  After much tracing, adding debug 
  lines, (and general chasing of wild geese,) it appears to me that the 
  following is happening:
  
 

  (So far so good)
 
  At the end of TReader.ReadData for the form, DoFixupReferences is called. 
  This sets the database to which the SQLQuery is attached by calling 
  TCustomSQLQuery.SetDatabase, which:
  Calls TCustomSQLQuery.OnChangeSQL, which:
  Calls Fparams.ParseSQL(FSQL.Text,True, ,psInterbase)
 
  However, the second parameter, true tells Fparams.ParseSQL to 
  DoCreate, which means dropping all the existing parameters and 
  recreating them from the sql text.  This means that the param field type 
  is lost, as the new parameters are created with  ftUnknown.
  
 
  Can you try if the attached patch fixes this?

 It does, in so far as the parameter specs are now retained, but now the 
 database property of sqlquery is not read, so it still can't work 
 properly.  In fact, I can't even set the database from the Lazarus 
 object inspector.

Huh? Are you sure? Did you recompile everything correclty?

  (Note also that the parameters are always created as psinterbase type 
  params.  I am not sure if this causes a problem, as it may be 
  overwritten somewhere, but it looks strange as there is a 'case' in 
  ParseSQL to cover the different types of parameter styles.)
  
 
  That's no problem, since the parameter style is only used to re-write
  the query in a format which the db-engine understands. The call to
  ParseSQL in OnChangeSQL doesn't use this result from the ParseSQL
  function. (The code is runned, though. So there is room for a
  optimization here)
 
 If OnChangeSql doesn't care what sort of database it is connecting to, 
 why is it necessary to call OnChangeSQL to from SetDatabase even though 
 the sqltext hasn't changed ?  Would it be sufficient to just unprepare 
 it ?  I guess not, you still want some of the other effects of running 
 OnChangeSQL.  I wondered about putting the contents of OnChangeSQL into 
 another (private) function, and passing it a parameter as to whether the 
 SQL had really changed (= DoCreate must be true) or not.  Then 
 OnChangeSQL could call NewFunction(True) and SetDatabase could call 
 NewFunction(false), and NewFunction would pass the parameter into 
 DoCreate when it called Fparams.ParseSQL.  In this case, does 
 SetDatabase really need the call to Fparams.ParseSQL ?

Yes. Despite there's no difference in parameter style, there is a
difference in the ConnOptions. 

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Introduction

2008-01-22 Thread Joost van der Sluis
Op dinsdag 22-01-2008 om 15:03 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
 On 22/01/2008, Mattias Gärtner [EMAIL PROTECTED] wrote:
  About: move from LCL to widgetset
  That was the goal of lazarus from the beginning.
 
 OK, I get that and respect the choice.  I'm simply wondering (from a
 personal point of view) if it's still the right way of doing things?
 Considering you have years of experience with Lazarus development...
 If you could do it (Lazarus LCL) over again, what would you change?
 Hindsight is a awesome thing.  :-)

For me: if Lazarus woudn't use native widgets, I woudn't use it. It's
one of the most important features for me. 

Else I could also use Java, for example. for me the main issue with Java
is that it doesn't 'feel' native for most users.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Making the IDE work with C/C++

2008-01-21 Thread Joost van der Sluis
Op maandag 21-01-2008 om 19:00 uur [tijdzone +0300], schreef Al Boldi:
 Joost van der Sluis wrote:
  Op maandag 21-01-2008 om 16:57 uur [tijdzone +0300], schreef Al Boldi:
   Exactly right!  The best feature is find declaration/implementation,
   but this only works for pascal code.  What is needed to make this work
   for c/c++?
 
  Just re-write the codetools.
 
 That's rather sad for an OOP design.

I don't know anything from the codetools-design.

 But still, I think it is important, so how hard would a rewrite be, and would 
 people be interested in joining the effort?

Very, very hard. c/c++ has a complete different structure then
pascal-code. That's what I meant: you'll have to start all over.

Let me remind you that Lazarus needs the full code or fpc's rtl and fcl.
So for it to work a user will need the full code from (for example) libc
on his machine. ;)

As I see it the Lazarus-IDE isn't so great, regardless if it's written
and used with Pascal, but _because_ it's written and used with pascal.
You can't just copy the concept into c/c++.

You could try, but I think you'll fail miserably...

(Question to think about is why there isn't any open-source native IDE
like Lazarus for c/c++ at all?)

Joost.


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Solution to the BIG compiled file issue!

2008-01-16 Thread Joost van der Sluis

Don't get me wrong, but some discussions are useless and do more harm
than good for the Lazarus. project imho. This is one of hem. Normally I
would simply not answer. But this takes too long imho, and too much time
which can be spend much better.

Op dinsdag 15-01-2008 om 13:10 uur [tijdzone -0500], schreef Lee
Jenkins:
  Do you really think, Lazarus should only exist to develop Lazarus? For 
  creating a successful and strong development tool (which is the goal 
  of the whole project AFAIK) you need not only contributors but users 
  as well...
  
  Why needs Lazarus users that contribute nothing?
  
  Vincent
  
 
 Vincent, I think not all users will contribute, maybe the majority of them 
 will 
 not, but they help the project nonetheless, IMO.

Those who will leave the project because of large exe-size, we don't
need.

 1. Some that do not contribute a lot will still spread the word of Lazarus, 
 especially if their experiences with Lazarus are good ones.

Those who will leave the project because of large exe-size, can only
spread fuzz. They will always find something to pick about. They can't
be serious.

 2. Some *will* contribute a little, a few may contribute a lot in various 
 ways 
 (documentation/testing if not actual code contributions).  I believe the Law 
 of 
 Averages is simply in control as far as this goes.  As the user based 
 increases 
 so will the contributions, bug reports, documentation, etc.  Maybe its like 
 panning for gold!

Those who will leave the project because of large exe-size, will only
scare people away. Especially real developers, who get tired of
discussions like this. They don't like it if they feel like they have to
take care of some newbies that will never develop theirselves furhter.

 Thanks for your hard work, Vincent (and other Lazarus developers).  Your work 
 does not go unappreciated :)

Each second that people like Vinvent spend on this, is lost time.
Offcourse we need to support the community. And Vincent is doing a great
deal in that way. That's probably the reason that he responded on this
thread, while the other lazarus-developers mostly did not. But this
takes too long, it will not take the project any further.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Solution to the BIG compiled file issue!

2008-01-16 Thread Joost van der Sluis
Op woensdag 16-01-2008 om 09:54 uur [tijdzone +0100], schreef Joost van
der Sluis:
 Don't get me wrong, but some discussions are useless and do more harm
 than good for the Lazarus. project imho. This is one of hem. Normally
 I
 would simply not answer. But this takes too long imho, and too much
 time
 which can be spend much better.

Some more information. 

When people try to use Lazarus for the first time. They write 'hello
world', compile, run. Add a breakpoint, compile, run. If debugging then
doesn't work, they'll toss Lazarus away. If they see lines with
hexadecimal numbers, they'll start googling or complaining.

Next step is that they compile one of their 'old, rusty' delphi/pascal
programs. To see if that still works. 

That are the things we need to think about while developing Lazarus.

The binary size - no one is interested in that. Only people who are
coming from Delphi. And that's because the Delphi compiler is written in
an time in which executable size was important! You only had 2400 baud
modems, and your harddisk had 20MB of storage space! That's the reason
why Delphi has all those tricks to keep files as small as possible, even
while you're developing. Nowadays no-one really cares. Unless you are
obsessed with comparing every detail of FPC/Lazarus with Delphi.

About the compilation time, some people argue that that would be faster
if the binary size (or the size of the .o files) is smaller. Well,
hurray! Compilation time drops from 1.2 seconds to 1.198 seconds That's
0.02 seconds faster! Fast, submit it to slashdot! That will learn those
C-users to bash pascal!

Same holds for executable-loading times. (According to the benchmarks
fpc is one of the fastes compilers in this aspect)

A thing which does matter, if the amount of memory the application uses
while running. I'm still annoyed by the fact that the 'clock' in the
corner of my screen consumes 5MB of internal memory, just to show the
time. And then I didn't count the python-runtime which is loaded to use
it. GNOME (Fedora) can take up to hundred or even more MB of memmory,
just to show some widgets. That annoys me. So I'm happy with Lazarus
which only needs twice the amount of internal memory then a stupid,
simple, clock.

I doubt that any non-Delphi user will ever make an issue about the
file-size. Until they want to distribute their applications, in which
case they'll have no problems with the strip option.

Offcourse, the core-developers could spend some time on an option to
strip the debug info from the LCL, but not of the whole application. But
it's importance is the same a typo on the about screen.

While the effort needed to implement it, is comparable to implementing
the basics of a out-of-the-box CGI-web system. (Or some steps further in
the development of the internal debugger)

I'm really happy with the Lazarus developers, who would spend their time
on the CGI-functionality, instead of useless functionality like typo's
and lcl-debuginfo-strip-options.

That's also the reason why Lazarus has become what it is, and the amount
of users is growing that fast: The project is driven by a team of
excellent developers, who know where they should spend their time on. 

The same holds, for example, for the iconset. I'm pretty pleased that
the core people didn't spend much time on it. And I'm pretty pleased
with Laurent and others, who have picked this up and made many patches
with new and improved Icons. They didn't start long threads on the
mailinglist to ask others to code a solution for their - from a
core-developer view - unimportant options. No they started long threads
with all sort of self-made Icons, compared them, and chooses the best of
them. Resulting in a far better looking Lazarus in just a couple of
months.

From time to time this threads pops up. Just like the 'icon' threads did
in the past. Now take your responsibility: if you are annoyed by the
fact of the big-binaries, you have to supply patches for that. If you
think that it's a big issue which we all have been waiting for you
would start spending time on it, to make that patch. Even if it would
take you months, you would do it. If not, it's not a big enough issue to
spend time on. And especially not to spend others time on, writing long
mails to the mailing list. ;)

Joost.

ps: Main idea of the message above isn't even debatable. So in case
you're already writing a long answer: stop that, I won't even read. And
certainly not answer.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Solution to the BIG compiled file issue!

2008-01-16 Thread Joost van der Sluis
No I am answering - to myself even:

Op woensdag 16-01-2008 om 11:18 uur [tijdzone +0100], schreef Joost van
der Sluis:
 A thing which does matter, if the amount of memory the application uses
 while running. I'm still annoyed by the fact that the 'clock' in the
 corner of my screen consumes 5MB of internal memory, just to show the
 time. And then I didn't count the python-runtime which is loaded to use
 it. GNOME (Fedora) can take up to hundred or even more MB of memmory,
 just to show some widgets. That annoys me. So I'm happy with Lazarus
 which only needs twice the amount of internal memory then a stupid,
 simple, clock.

Thus, being a good Open-Source developer, I should write my own clock,
or stop complaining about it. ;) Broke my own rule ;) (As a Defense,
I did writ my own clock, but didn't finished it, so it wasn't annoying
enough)

 From time to time this threads pops up. Just like the 'icon' threads did
 in the past. Now take your responsibility: if you are annoyed by the
 fact of the big-binaries, you have to supply patches for that. If you
 think that it's a big issue which we all have been waiting for you
 would start spending time on it, to make that patch. Even if it would
 take you months, you would do it. If not, it's not a big enough issue to
 spend time on. And especially not to spend others time on, writing long
 mails to the mailing list. ;)

As Fabio (and others) does now with the docking-system. Seems like that
the lack of this feature is more annoying than the binary size. So let's
concentrate on that and keep up the good work! 

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [fpc-devel] Invalid field size : 8

2008-01-11 Thread Joost van der Sluis
Op donderdag 10-01-2008 om 20:28 uur [tijdzone +0100], schreef Bogusław
Brandys:
 Horacio Jamilis wrote:
  It seems that the Size field shoud be 0 (zero) for numeric fields...
  The size property of TField have different meanings for the different 
  field types.
  
  So, you should not set the size property of an Integer field to anything 
  (the default 0 value is correct).
  
  Hope this helps.
  
  Horacio
 
 
 Yes,I found it too.Very bad.I think that it should be processed silently 
 instead of force every package which is working under Delphi to modify.

That this works in Delphi is a Delphi-bug. TField.Size should contain
the amount of decimals, which is really 0 for an integer. But it seems
like that most components-developers don't know this, and the Delphi-bug
is that it is not enforced. It's the DataSize property that has to be 8
(or 4).

FPC has the same bug in all released versions. I changed the behaviour
in fpc 2.3.1 to see what happens. It was merged to fixes too, though.

I'll look how to fix this without removing the call to CheckTypeSize
completely. (Maybe ignore invalid values for those fields where it
doesn't matter, like integer-fields)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Question about packages and units

2008-01-08 Thread Joost van der Sluis
Hi al,

If you install the fpWeb package, create a new cgi-application with a
TFPWebModule. You can drop a THTMLEntityProducer on that module. So far
so good. Then you can add an OnWritePage event, but thereafter the
program will nog compile anymore, because you have to add the
'htmlwriter' unit to your uses clause manually.

Question is: how can I do this automatically? Thus that when you drop a
THTMLEntityProducer on a module, add the 'htmlwriter' unit
automatically?

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Question about packages and units

2008-01-08 Thread Joost van der Sluis
Op dinsdag 08-01-2008 om 14:14 uur [tijdzone +0100], schreef Mattias
Gärtner:
 Zitat von Joost van der Sluis [EMAIL PROTECTED]:
 
  Hi al,
 
  If you install the fpWeb package, create a new cgi-application with a
  TFPWebModule. You can drop a THTMLEntityProducer on that module. So far
  so good. Then you can add an OnWritePage event, but thereafter the
  program will nog compile anymore, because you have to add the
  'htmlwriter' unit to your uses clause manually.
 
  Question is: how can I do this automatically? Thus that when you drop a
  THTMLEntityProducer on a module, add the 'htmlwriter' unit
  automatically?
 
 The IDE should do this automatically. What package installs 
 THTMLEntityProducer?

components/fpweb/weblaz.lpk

Joost


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Question about packages and units

2008-01-08 Thread Joost van der Sluis
Op dinsdag 08-01-2008 om 14:29 uur [tijdzone +0100], schreef Joost van
der Sluis:
 Op dinsdag 08-01-2008 om 14:14 uur [tijdzone +0100], schreef Mattias
 Gärtner:
  Zitat von Joost van der Sluis [EMAIL PROTECTED]:
  
   Hi al,
  
   If you install the fpWeb package, create a new cgi-application with a
   TFPWebModule. You can drop a THTMLEntityProducer on that module. So far
   so good. Then you can add an OnWritePage event, but thereafter the
   program will nog compile anymore, because you have to add the
   'htmlwriter' unit to your uses clause manually.
  
   Question is: how can I do this automatically? Thus that when you drop a
   THTMLEntityProducer on a module, add the 'htmlwriter' unit
   automatically?
  
  The IDE should do this automatically. What package installs 
  THTMLEntityProducer?
 
 components/fpweb/weblaz.lpk

Well, it is.

Here with me, locally... 

I thought that I already send in the patch to add it to Lazarus. Seems
like I didn't. Attached is the patch. The THTMLEntityProducer is only
for fpc 2.2.3 and above so I added some ifdefs for fpr 2.0.4 and 2.2.0.

Joost.


Index: weblazideintf.pp
===
--- weblazideintf.pp	(revision 13658)
+++ weblazideintf.pp	(working copy)
@@ -96,7 +96,9 @@
 begin
   RegisterComponents(fpWebTab,[THTMLDatasetContentProducer,
THTMLSelectProducer,
-   THTMLDatasetSelectProducer])
+   THTMLDatasetSelectProducer
+   {$IFNDEF VER2_0}{$IFNDEF VER2_2_0},THTMLEntityProducer{$ENDIF}{$ENDIF}
+   ])
 
 end;
 


Re: [lazarus] SqlDB component madness

2007-12-14 Thread Joost van der Sluis
Op woensdag 12-12-2007 om 20:50 uur [tijdzone +0100], schreef Michael
Van Canneyt:
 
 On Wed, 12 Dec 2007, Michael Van Canneyt wrote:
 
  
  
  On Wed, 12 Dec 2007, Graeme Geldenhuys wrote:
  
   On 12/12/2007, Michael Van Canneyt [EMAIL PROTECTED] wrote:
   
If all works as I want it, this should be reduced to 4 steps for the 
default cases,
   
   
   That is what I expected and what I was used to in Delphi.  I gather
   the change you are talking about would work from code as well, and not
   just some Lazarus Object Inspector magic?
  
  Yes, of course it would work in code as well.
  I'll see about doing this tonight.
 
 Done and committed. Sent test program to Joost.

Well, more important is: did you run the db-testsuite in fcl-db/tests
and compared the results with
http://menora.cnoc.nl/intern/testsuite.cgi?

;)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] MySQL Queries using Lazarus

2007-12-12 Thread Joost van der Sluis
Op dinsdag 11-12-2007 om 15:54 uur [tijdzone -0800], schreef el
stamatakos:
 Hi All,
  I have an application that connects to a MySQl database. I have found the 
 only way to get Lazrus to work without giving me an error Cannot access 
 Active DataSet is to do a Clear,Add, Open Close, like below
 
 MainForm.SQLQuery1.SQL.Clear;
 MainForm.SQLQuery1.SQL.Add('SELECT revID from rev WHERE 
 revName='+#39+CBProcessRev.Text+#39);

If you want to save some code, you could replace the lines above with:

Mainform.SQLQuery1.SQL.Text := 'SELECT revID fro..';

Joost


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] MySQL Queries using Lazarus

2007-12-12 Thread Joost van der Sluis
Op woensdag 12-12-2007 om 22:51 uur [tijdzone +1100], schreef John:
 ik wrote:
  One small note, you have an SQL injection at your code. I recommend
  you to use parameters as how to add the values, but prior to that, you
  should check to see if there are invalid chars, and trim them. That
  way, you can avoid a lot of problems.
 
  Ido

 Perhaps you should explain what is so terrible about a SQL injection 
 ?  I have heard of this before, but not the reason.  I do this regularly 
 and it seems to work fine! 

Suppose the query is like this: (from some mails earlier)

MainForm.SQLQuery1.SQL.Add('SELECT revID from rev WHERE 
revName='+#39+CBProcessRev.Text+#39);


Oh, yes it works. Until...

A user types  '; drop table rev; in CBProcessRev.

Well, that will still work. But only once. ;)

Joost

(btw: this won't work with all TSQLConnections, because some don't
accept a semicolon)



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Joost van der Sluis
Op woensdag 12-12-2007 om 15:11 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
 
 Step 1:
 ==
 TIBConnection   -   TSQLTransaction  via  'Database' property. No problem 
 here.
 
 Step 2:
 ==
 TIBConnection  -  TSQLTransaction  via 'Transaction' property.
 Why???  Why must you link components in both directions?

You don't need to do this. It is used when the TIBConnection tries to
execute some sql-statements itself. If has to know which transaction it
should use. You have to see this as the 'default transaction'. If you do
TIBConnection.ExecuteDirect, this transaction is used. This transaction
is also used when you use ApplyUpdates.

 Step 3:
 ==
 TSQLTransaction   -  TSQLQuery via 'Transaction' property. No problems here.
 
 Step 4:
 ==
 TIBConnection   -  TSQLQuery via 'Database' property. Why???  Can't
 it figure it out from the TSQLTransaction it's hooked up to already
 (step 3)?  What happens if the Transaction component is hooked up to
 DB1 and then I specify DB2 in the Database property?

Hm.. I never thought about that, really. It could be usefull, though.
For example Oracle supports transactions which are working on several
groups of databases Not that this is supported by sqldb...

Michael, would it be an idea to remove this link?

 Step 5a:
 ==
 TSQLQuery   -   TDatasource via the 'Dataset' property.  No problems here.
 
 Step 5b: (optional)
 ==
 TSQLQuery  -  TDatasource via the 'DataSource' property.  It can be
 done, but wasn't needed to get my example project to work. Not sure
 what's the rules about this one.

I've been mistaken about this one more then once. Also my collegues had
problems with this.
iirc it's renamed to something else in recent versions. What it does is
handling the master-detail relationships. 

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] some questions

2007-11-29 Thread Joost van der Sluis
Op woensdag 28-11-2007 om 15:08 uur [tijdzone -0300], schreef Arí
Ricardo Ody:
 Talking about databases:
 
 Was the bug of Lazarus with date, time and timestamp types when 
 accessing DB2 tables fixed?

DB2? I don't know any components which support DB2?

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLite 3 -- Capture FieldValues into a variable

2007-11-27 Thread Joost van der Sluis
Op maandag 26-11-2007 om 23:50 uur [tijdzone +0100], schreef Joost van
der Sluis:
 Op maandag 26-11-2007 om 15:05 uur [tijdzone +0100], schreef Roberto
 Padovani:
  2007/11/26, Daniel Rincón García [EMAIL PROTECTED]:
  To the Great Guys of the lazarus project:
  
  I am finishing a medium size project with lazarus + sqlite3, for which
  I had study and experiment a lot due to the fact that, IMHO, the
  database tutorial was slightly too quick on the sqlite part.
  Would you appreciate it if I wrote a tutorial (= commented example) on
  sqlite3 with basic topics like the one above and the not so trivial
  date management stuff ?
  If you don't really care about it, I won't spend time on it; but if
  you do care, please point me to the instructions for the wiki and/or a
  tutorial page templatethis will be my Christmas present to the
  Lazarus project. :-)
 
 The database-documentation is as good as non-existent. All examples and
 tutorials are usefull. So please do.

For those who are worried now: the documentation and examples of most
other TDataset-based components which can be found all over the net,
books etc. do basically also apply to fcl-db. It could be that you need
some slight adjustions, but the ideas behind it all are the same.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLite 3 -- Capture FieldValues into a variable

2007-11-26 Thread Joost van der Sluis
Op maandag 26-11-2007 om 13:17 uur [tijdzone +0100], schreef Daniel
Rincón García:
 Hi, I need to capture the FieldValues of a SQLite database into a
 string variable.
 
 If I do it:
 
while not dsTest.EOF do
 begin
  DataToSend := DataToSend + 
 dsTest.FieldValues ['Code'] + '\' +
 dsTest.FieldValues['Name'] + '\' + 
 dsTest.FieldValues['Address'] + '#';
  dsTest.Next;
 end;
 
 I have got the next error message:
 
 Project raised exception class 'RunError(231)'.

Use .asstring as mentioned elsewhere, and submit a bug
(http:/www.freepascal.org/mantis, fpc-project) because what you do
shouldn't give this error.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLite 3 -- Capture FieldValues into a variable

2007-11-26 Thread Joost van der Sluis
Op maandag 26-11-2007 om 15:05 uur [tijdzone +0100], schreef Roberto
Padovani:
 2007/11/26, Daniel Rincón García [EMAIL PROTECTED]:
 To the Great Guys of the lazarus project:
 
 I am finishing a medium size project with lazarus + sqlite3, for which
 I had study and experiment a lot due to the fact that, IMHO, the
 database tutorial was slightly too quick on the sqlite part.
 Would you appreciate it if I wrote a tutorial (= commented example) on
 sqlite3 with basic topics like the one above and the not so trivial
 date management stuff ?
 If you don't really care about it, I won't spend time on it; but if
 you do care, please point me to the instructions for the wiki and/or a
 tutorial page templatethis will be my Christmas present to the
 Lazarus project. :-)

The database-documentation is as good as non-existent. All examples and
tutorials are usefull. So please do.

A few people send a mail to the fpc-pascal mailinglist about adding some
documentation about fcl-db.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Recompile FPC unit

2007-11-19 Thread Joost van der Sluis
Op zaterdag 17-11-2007 om 10:34 uur [tijdzone +1000], schreef SteveG:
 I (think) I have found an error in the FmtBCD unit
 (from C:\lazarus\fpc\2.2.1\units\i386-win32\rtl )
 
 A simple empty dll will not load if this unit (or any 'using' it is used.
 So far as I can tell, the problem 'seems' to be with the following lines
 
 {$r+,q+,s+}
 { $r-,q-,s-}
 
 Remove the space at the front of the second line, problem disappears.

That could explain several db-bugs about building dll's when the db-unit
is used.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DataAccess components in lazarus 2.9.24

2007-11-16 Thread Joost van der Sluis
Op vrijdag 16-11-2007 om 08:10 uur [tijdzone +0300], schreef Jury
Azovtzev:
 Hallo!
 
 I tryied to make education LiveCD with lazarus for students in local
 college. But when i run all i found out there is not transactions,
 Mysql and PostrgreSQL components in new lazarus anymore. Could someone
 explane? Are they in other place now? Or what i have to do to make
 application with data access functions? 

Those classes were very old, contained many bugs and weren't maintained
anymore. So they were removed. The code is still there , though, in
packages/fcl-db/src/unmaintained. So if you really need them, you can
use the code there and compile them yourself.

But I suggest to use sqldb, which replaces all those classes.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] double posted bug report :(

2007-11-16 Thread Joost van der Sluis
Op vrijdag 16-11-2007 om 14:07 uur [tijdzone +0700], schreef Bee:
 For Lazarus' Mantis maintainer(s),
 
 Please remove my bug report with ID: 0010191. It exactly duplicates my
 other bug report with ID: 0010190. It's purely unintended because I
 accidentally clicked the submit button twice. I apologize for the
 inconvenience.
 
 I'm new to Mantis system. :-D

I think that you can do that yourself. Just add a new relationship,
choose 'duplicate of' and give the bug-number. Then click add.

Thereafter you can close the bug with 'change status to'

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus IDE revamp

2007-11-15 Thread Joost van der Sluis
Op donderdag 15-11-2007 om 12:33 uur [tijdzone -0800], schreef Ciprian
Mustiata:
 Based on that issues, and some more, me and that designer will not
 look back to Delphi legacy, excluding the LCL and we will try to
 manage to make a fork of Lazarus. The role of that fork is very easy:
 it will must provide bet UI for user, and will not take care about
 users that say: in Delphi is different, because Lazarus is not
 Delphi, is much better. That fork will be maintained to an external
 server, like OpenSVN one and hopefully when will get enough substange
 to get it's own merit as an upgrade to Lazarus, hopefully will be
 merged back to Lazarus code.

I don't understand where you need a fork for? If you have patches for
the ide, just send them in. If they are usefull they'll get committed?

Joost


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Bad news

2007-11-13 Thread Joost van der Sluis
Op dinsdag 13-11-2007 om 10:47 uur [tijdzone +0200], schreef Dave
Coventry:
 On Nov 13, 2007 10:22 AM, Michael Van Canneyt [EMAIL PROTECTED] wrote:
  But everyone is open for a constructive discussion.
 
 Speaking of which, Mr. Trefethen has posted what he claims are some of
 the plagiarisms in the FPC code on his blog.
 
 http://www.stevetrefethen.com/blog/IWishTheDelphiCommandLineCompilerWereFree.aspx

Thanks for the head-up. I answered this one.

And I would almost ask him to write the same functionality in some other
way. Because I think there is no real alternative.

Those who have commit rights on Freepascal and Lazarus are very keen on
this kind of issues. Offcourse something could have slipped through,
because most of the fpc-developers simply don't know the Delphi-code, so
it's difficult te recognize is. Especially if you can not take a look in
the Delphi-code itself, since that could be a problem in itself
already. 

But Freepascal and Lazarus aren't build using Delphi code. I'm pretty
sure of that.

Joost



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] [fpc] SQLdb: not clear excetion, Server connect failed.

2007-11-01 Thread Joost van der Sluis
fpc 2.2.0 sqldb-mysql doesn't work on 64-bit systems. You should use fpc
2.2.1.

Joost

Op woensdag 31-10-2007 om 17:19 uur [tijdzone +0100], schreef Alvise
Nicoletti:
 I finally managed to install lazarus on a linux 64 bits.
 
 But when I start the once-32-bit-working program that now is at 64 bit I 
 get this message when I do a query:
 Server connect failed.
 
 I also got a Connection esabilished in the beginning of the program. 
 So that should not be a library problem.
 
 How can I troubleshoot this?
 
 On the system 64 bits libs are correctly working.
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
-- 

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLdb and 64 bits

2007-10-18 Thread Joost van der Sluis
Op woensdag 17-10-2007 om 18:03 uur [tijdzone +0200], schreef Alvise
Nicoletti:

 I tryed to compile my linux service for a server with ubuntu 64 bit and 
 mysql 5.
 So I changed in the code every mysql40 reference to mysql50.
 I tryed to change target, compile, and copy the binary to the another 
 server, when I try to connect to the database all I get is:
 Can not load MySQL library libmysqlclient.so. Please check your 
 installation.
 
 The server configuration is ubuntu 64 bit, mysql 5.0 (client and server).
 
 I need an application that works on this kind of server, so if you 
 suspect that I can have any trouble with this in the future please 
 notify it to me. I'm a little scared about that.
 Is it just a misconfiguration problem?
 
 If I do a locate libmysqlclient.so I found:
 /usr/lib/libmysqlclient.so.15
 /usr/lib/libmysqlclient.so.15.0.0

You have to install the 64-bit version of the mysql-client. On most
distributions, that's located in /usr/lib64/ and not /usr/lib.

So take a look in /usr/lib64 It's most probable that the correct link is
missing there. (The usual mysql-library-link-issues)

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLdb and 64 bits

2007-10-18 Thread Joost van der Sluis
Op donderdag 18-10-2007 om 11:32 uur [tijdzone +0200], schreef Alvise
Nicoletti:
 Joost van der Sluis ha scritto:
  Op woensdag 17-10-2007 om 18:03 uur [tijdzone +0200], schreef Alvise
  Nicoletti:
 

  I tryed to compile my linux service for a server with ubuntu 64 bit and 
  mysql 5.
  So I changed in the code every mysql40 reference to mysql50.
  I tryed to change target, compile, and copy the binary to the another 
  server, when I try to connect to the database all I get is:
  Can not load MySQL library libmysqlclient.so. Please check your 
  installation.
 
  The server configuration is ubuntu 64 bit, mysql 5.0 (client and server).
 
  I need an application that works on this kind of server, so if you 
  suspect that I can have any trouble with this in the future please 
  notify it to me. I'm a little scared about that.
  Is it just a misconfiguration problem?
 
  If I do a locate libmysqlclient.so I found:
  /usr/lib/libmysqlclient.so.15
  /usr/lib/libmysqlclient.so.15.0.0
  
 
  You have to install the 64-bit version of the mysql-client. On most
  distributions, that's located in /usr/lib64/ and not /usr/lib.
 
  So take a look in /usr/lib64 It's most probable that the correct link is
  missing there. (The usual mysql-library-link-issues)

 I don't know if I'm wrong... but...:
 # ls -al /usr/
 drwxr-xr-x  88 root root 20480 2007-10-18 09:36 lib
 drwxr-xr-x   4 root root  4096 2007-07-18 12:13 lib32
 lrwxrwxrwx   1 root root 3 2007-07-17 16:37 lib64 - lib
 
 So, if lib64 is just a link to lib... it should work anyway, right?

Yes, but that's not how the distribution I use has solved it.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLdb : program crash using more than 9-10 fieldsets: bug...?

2007-10-18 Thread Joost van der Sluis
Op donderdag 18-10-2007 om 11:23 uur [tijdzone +0200], schreef Alvise
Nicoletti:
 This is a bug notification... I managed to re-create the segmentation 
 fault bug.
 
 The service was crashing without giving any output and any reason, the 
 problem was in the NUMBER of the parameters in the result set fetched in 
 the select:
 10.
 
 Fetching less parameters (9), all works. You can add and remove any kind 
 of parameter, not one in particular to force the crash.

Oh, yes, I knew that. That's fixed in fpc 2.3.1. I'll merge the fix to
fpc 2.2.1.

 A strange thing is that if I set parseSQL to true, I get a mysql syntax 
 error before the crash of the application:
 Check the manual that corresponds to your MySQL server version for the 
 right syntax to use near 'GROUP BY i.pk_iscrizione, i.n_ingressi, 
 t.nome, a.nome, a.tipo_

Well, please first update to at least fpc 2.2.0.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] beginners questions on handling lazarus

2007-10-16 Thread Joost van der Sluis
Op dinsdag 16-10-2007 om 02:19 uur [tijdzone +0200], schreef Marc
Santhoff:
 Am Dienstag, den 16.10.2007, 01:53 +0200 schrieb Mattias Gaertner:
  On Tue, 16 Oct 2007 01:10:08 +0200
  Marc Santhoff [EMAIL PROTECTED] wrote:
  
  You should consider updating your lazarus/fpc, because some database
  bugs were fixed, new features were added and lazarus has now the
  lazdatadesktop tool.
 
 I will (see question 4). I only asked because i read an old book about
 Delphi 3 for remembering how database access works. But since a table
 held by a sql server is a generalization of a query (select * from
 table) that fine with me.

You should really update Lazarus. With an updated version, you also
don't need the path to libgds anymore. The library is loaded
dynamically.

The difference between the  Delphi3 TTable and a query is more then the
select. The TTable creates the SQL-statement, which has the advantage
that it exactly knows what it's doing, so that the TTable is also
updateable. 

Nowadays updating tables is done differently. For example SQLdb parses
the supplied query, to see if the query is updateable or not. 

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] beginners questions on handling lazarus

2007-10-16 Thread Joost van der Sluis
Op dinsdag 16-10-2007 om 08:43 uur [tijdzone +0800], schreef Paul
Ishenin:
 Marc Santhoff wrote:
  Getting HEAD or trunk is no problem, but I have to support FreeBSD 4 and
  thus fpc 2.0.4 for a while. This requirement leads to checking out the
  last version of lazarus compilable and working flawlessly with this
  version of fpc.
  
  If someone could tell me the svn revision for lazarus 0.9.23 this would
  do (I think).
 
 Lazarus 0.9.24 will be (and ofcource 0.9.23 is) compilable with fpc 
 2.0.4. So you can get trunk. Lazarus support for 2.0.4 will be stoped 
 with fpc 2.2.2 (as I think).

Just out of curiosity, what is the problem in fpc 2.2.0 that someone
would still use fpc 2.0.4?

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLdb : get last_inserted_id

2007-10-16 Thread Joost van der Sluis
Op dinsdag 16-10-2007 om 10:45 uur [tijdzone +0200], schreef Alvise
Nicoletti:
 John ha scritto:
  Alvise Nicoletti wrote:
  Hi... this is the complete code I'm using to extract the 
  last_insert_id from the table TABLE1, but it still don't works.
  Infact I get always 0 from the variable id_ingresso, pheraphs in 
  the database the row is correctly inserted.
 
  Hi Alvise,
 
  I haven't gone through you example completely, but try doing the same
  thing by generating the sql text on the fly instead of using
  parameters.  I was unable to get anything to work using parameters when
  I last tried a few months ago.
 
  cheers,
  John
 
  _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
 
 
 I tryed but that wasn't the problem... With delphi+zeoslib the (nearly) 
 same code works, so I suppose I found some kind of bug...
 How can I debug this?

Compile fcl-db with debuginfo. If you use Lazarus, you can simply add
fpcsrc/packages/fcl-db/sqldb and fpcsrc/packages/fcl-db/sqldb/mysql to
your project-sources path.

Or you can do a 'make clean all OPT='-gl' install' in
fpcsrc/packages/fcl-db. But then you have to take care that the
generated .ppu files are installed into the right paths. (On windows
this is mostly not the case)

 I tryed, as you see in the code, to handle the transaction like if it's 
 only one block of operations...
 ... Maybe there is an implicit commit after the query execution that I 
 don't know how to remove?

I haven't debugged your code yet, but sqldb doesn't support transactions
at all for mysql (As mysql  5 doesn't do so either) So it  doesn't do
any commits. As you've set parsesql to false, it also doesn't do any
extra queries, do I think it should work.

For a real solution you should have take a look at
http://www.freepascal.org/mantis/view.php?id=9758

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] beginners questions on handling lazarus

2007-10-16 Thread Joost van der Sluis
Op dinsdag 16-10-2007 om 18:24 uur [tijdzone +0200], schreef Marc
Santhoff:
  The difference between the  Delphi3 TTable and a query is more then
 the
  select. The TTable creates the SQL-statement, which has the
 advantage
  that it exactly knows what it's doing, so that the TTable is also
  updateable. 
 
 Okay, I read this as TTable is sort of an ancient artifact and one
 should not care for future developments.

You can read it that way, yes. ;)

  Nowadays updating tables is done differently. For example SQLdb
 parses
  the supplied query, to see if the query is updateable or not. 
 
 Is there a rule of thumb, when a query is (or is not) updatable?

When it fetches its data from only one table, it should be updateable. 

but you can make every table updateable, but then you should provide the
update-, insert- and delete-sql statements manually.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Changes in Makefile.fpc for fpc 2.2.0

2007-10-16 Thread Joost van der Sluis
Hi all,

If you run 'fpcmake -Tall' in the lazarus-directory to create a new
Makefile, it will fail if you use fpc 2.2.0.

That's because the Makefile.fpc says it needs the package 'fcl', but
that package doesn't exist anymore.

Replacing it by fcl-base, fcl-db, fcl-etcetc could fix it, but then it
won't work with fpc-2.0.4 anymore. (It will compile, you only can't
update the Makefile)

Maybe it's an idea to remove the fcl-dependency alltogether, since every
fpc-installation has the fcl installed by default. It's not really
needed there. (I tried, lazarus does compile with a makefile generated
without the fcl-dependency)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLdb : get last_inserted_id

2007-10-12 Thread Joost van der Sluis
Op vrijdag 12-10-2007 om 10:39 uur [tijdzone +0200], schreef Alvise
Nicoletti:

Qry.Active := false;

I don't see anything strange. It should work, except that the following
query is incorrect (incomplete).

Qry.SQL.Text := 'INSERT INTO ECCETERA';

And it also has no parameters. Maybe there's an error on your log?

Qry.Params.ParamByName('PK_parameter').AsInteger := self.id_parameter;
try
   Qry.ExecSQL;

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus review

2007-10-10 Thread Joost van der Sluis
Op woensdag 10-10-2007 om 00:23 uur [tijdzone +0200], schreef Michael
Van Canneyt:
 Did anyone ever notice this ?

Yes

 http://www.linux.org/apps/reviews/lazarus.html

See the news post of sept 8th on the Lazarus website.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] r12175/gtk1 doublebuffering causes huge slowdowns

2007-10-07 Thread Joost van der Sluis
Since revision r12175 Lazarus/synedit responds very slow on each
keypress. (approx 5 sec)
I'm using linux/gtk1 through vnc. I didn't test locally, but since I
didn't hear anybody else about this problem, I guess the problem is only
noticeable through vnc.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TRegistry crash on Mac OS X

2007-10-07 Thread Joost van der Sluis
Please create a bug report for fpc (not lazarus)
(http://www.freepascal.org/mantis) and attach your files to the
bug-report.

Joost.

Op zondag 07-10-2007 om 23:05 uur [tijdzone +0200], schreef Tobias
Giesen:
 Hello,
 
 there are one or two bugs in xmlreg.pp that can cause crashes.
 
 I am talking about the xmlreg.pp in fpcsrc\packages\fcl-registry\src.
 
 Around line 355, it is not verified whether Node.FirstChild is nil.
 
 Around line 720, the function does not return any value.
 
 I have copied the file into my project directory and made some fixes.
 Luckily, the fpc compiler now uses my version rather than the default
 version.
 
 I don't know how to submit the fixes so I've put the updated file here:
 http://www.superflexible.com/xmlreg.pp
 
 Cheers,
 Tobias Giesen
 
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
-- 

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Another icons for Lazarus

2007-09-15 Thread Joost van der Sluis
Op zaterdag 15-09-2007 om 00:50 uur [tijdzone +0200], schreef wile64:

 /9/11, Joost van der Sluis [EMAIL PROTECTED]:
 Well... if you have time, do you also allow requests?
 
 The icons of the sqldb-components aren't really beautiful. And
 the
 components in the fp-web-package (lazarus/components/fp-web)
 are
 non-existent... ;) 
 
 
 Joost
 
 You finds that prettier?

YES! A lot, thank you.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Another icons for Lazarus

2007-09-11 Thread Joost van der Sluis
Well... if you have time, do you also allow requests?

The icons of the sqldb-components aren't really beautiful. And the
components in the fp-web-package (lazarus/components/fp-web) are
non-existent... ;)


Joost

Op dinsdag 11-09-2007 om 16:43 uur [tijdzone +0200], schreef wile64:
 See the sujet !
 
 
 Regard,
 
 -- 
 Laurent.
 
 My Web : http://wile64.neuf.fr/
 French Forum : http://lazforum-fr.tuxfamily.org/index.php
-- 

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Freepascal 2.2.0 released

2007-09-10 Thread Joost van der Sluis
The Free Pascal Compiler team is pleased to announce the release of FPC 
2.2.0! 

An overview of most changes is available below, but some highlights are:

* Architectures: PowerPC/64 and ARM support
* Platforms: Windows x64, Windows CE, Mac OS X/Intel, Game Boy  
Advance, and Game Boy DS support
* Linker: fast and lean internal linker for Windows platforms
* Debugging: Dwarf support and the ability to automatically fill  
variables with several values to more easily detect uninitialised uses
* Language: support for interface delegation, bit packed records and
arrays and support for COM/OLE variants and dispinterfaces
* Infrastructure: better variants support, multiple resource files  
support, widestrings are COM/OLE compatible on Windows, improved  
database support

Downloads are available at http://www.freepascal.org/download.var

Enjoy!

The Free Pascal Compiler Team



**
  What's New in 2.2.0
**

Free Pascal 2.2.0 contains a lot of bug-fixes and new features. The work on
Free Pascal 2.2.0 started halfway during the year 2005. A lot has been improved
since then.

Please also see http://wiki.freepascal.org/User_Changes_2.2.0 for a list
of changes which may affect the behaviour of previously working code, and
how to cope with these changes.

Platforms:
  * New platform: Win64. FPC is the first open source compiler for 64-bit
 Windows operating systems.
  * New processor architecture: 64-bit PowerPC
* PowerPC/64 support for Linux
  * Mac OS X on Intel (i386) is now supported
  * New platform: Windows CE (Windows Mobile)
  * New platform: Nintendo Game Boy Advance
  * New platform: Nintendo DS
  * Native support for ARM-platform
  * GO32V2 DOS platform got a long needed update

Compiler:
  * Internal linker for win32, win64 and wince, resulting in smaller
executables, less memory used during compilation, and faster compile
times for programs using large frameworks like for example the Lazarus
Component Library.
  * Generics (experimental)
  * Bit packed arrays and records
  * Resourcestrings can now be smartlinked, resulting in smaller executables
  * Multiple resource files support
  * pointer[low..high] syntax to pass C-style pointer arrays to procedures
using open arrays
  * Interface delegation
  * Proper safecall implementation
  * Wide strings are COM/OLE compatible on Windows
  * Added several speed optimisations, for example:
* Compiler can omit stack frames (x86 and ARM)
* Compiler can store records in registers
* Tail recursion expansion
* Register renaming optimizations
  * Improved optimizer for ARM CPU
  * Compiler can initialise local variables, function results, and out
parameters with several values (command line parameters -gt till -g)
to help find uses of uninitialised variables
  * Compiler can now properly deal with paths  255 characters in all cases
  * Dwarf debug format support
  * Reduced memory usage during compilation
  * Lot of small bugs and compatibility fixes

RTL:
  * Heap uses less memory
  * Improved variants support
  * Improved currency support
  * Exception handling can be used without SysUtils unit
  * Lot of small bug and compatibility fixes

FCL:
  * Improved database support
  * The obsolete sqlitedataset, interbase, fpodbc, ddg, mysqldb3 and mysqldb4
units are removed
  * Lot of small bugs and compatibility fixes

Packages:
  * Added a new fppkg package manager
  * Improved database support
  * Added Delphi compatible RichEdit unit
  * Apple universal interfaces updated to r204 of the common FPC/GPC/MW
interfaces
  * Lot of small bugs and compatibility fixes

Free Vision:
  * Now uses resourcestrings

IDE:
  * Evaluate window
  * Improved HTML rendering
  * Improved xterm support
  * Small bug fixes

Misc:
  * Improved documentation
  * Better cross compilation support

For a detailed list of reported bugs that are fixed in this release see the
bugtracker report at http://www.freepascal.org/mantis/changelog_page.php


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Another little help with databases

2007-07-17 Thread Joost van der Sluis
On Tue, 2007-07-17 at 08:34 +0200, Bram Kuijvenhoven wrote:
 German C. Basisty wrote:
  I have now a form with a working TPQConnection, a TSQLTransaction, a 
  TSQLQuery with a  ‘select * from product’ as SQL, a TDatasource, an a 
  TDBGrid, everithing is working fine and every product is shown on the 
  DBGrid as expected. Now I want to add an TEdit to make posible searching 
  products by name, for example, so when the user writes something on the 
  Edit, the SQLQuery1.SQL should become something like ‘select * from 
  product where name = ‘ + Edit1.Text + ’
 
 I assume you don't want to create an SQL injection bug, so you should either 
 properly escape Edit1.Text, or use query parameters instead; see e.g. 
 http://wiki.freepascal.org/Secure_programming#Injection. I recommend using 
 query parameters.

You could also use a filter. Like 'tsqlquery.filter := 'name = ' +
edit1.text. then the dataset is filtered in memory. But if the dataset
is too big, and you only want to use a small sub-set, you could use the
'serverfilter', this way the 'filter' is added to the sql automatically.
But then you can get (just like by modifying the sql yourself) an
injection-bug.

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Another little help with databases

2007-07-17 Thread Joost van der Sluis
On Tue, 2007-07-17 at 21:40 +0200, Bram Kuijvenhoven wrote:
 
 I didn't know about ServerFilter. [/me is looking it up...] Ah, from
 the SQLDB source I see the contents of ServerFilter are simply pasted
 into the query (at the right place, with a WHERE () or AND () added).
 I assume that this is also the intended behavior? (That is of course
 no problem, as long as the user is aware of this).

Yes. It obviously only works with ParseSQL set to true. It also
automatically handles the refresh of the dataset.

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Subrows in grids...

2007-07-03 Thread Joost van der Sluis
On Tue, 2007-07-03 at 03:05 -0500, Jesus Reyes A. wrote:
 - Original Message - 
 From: Joost van der Sluis [EMAIL PROTECTED]
 To: lazarus@miraclec.com
 Sent: Saturday, June 30, 2007 1:58 PM
 Subject: Re: [lazarus] Subrows in grids...
 
 
  On Wed, 2007-06-20 at 17:51 -0500, Jesus Reyes wrote:
 [snip]
  Looks nice!
 
  About the patch, I just applied and didn't take a closer look, will
  try to do later, initially there seems to be many problems for
  example, the TStringGrid editor doesn't know about subrows, and
  crashed my lazarus badly, I also wasn't able to reproduce your image,
  if issues are fixed I think we should add it.
 
  Here is a new patch. This one works better.
 
 AV's are fixed, but I'm afraid it's still not ready, I been testing and 
 found many issues will list only (IMO) the two most important.

Yes, it's not ready at all... But the problems are problems for the
programmer, not the end-user. 

 1. Gaps are not redrawn, gaps are formed under various circunstances: using 
 SubRowCount without custom columns, columns with different sizes (very 
 common in dbgrid), etc. This might be a little difficult to get it working 
 right.

Yes, I already mentioned this in my first mail about this feature. 

 2. It doesn't work with fixed columns, I guess in multi subrow grid, cells 
 in fixedrows zone should automatically use SubRowCount*DefaultRow height, 
 this issue doesn't allow a dbgrid to work/look ok too.

It worked here, except from some problems with fixed columns which were
also present without this patch. I'll have a look.

 Maybe the feature is not intented to work under all circunstances but in 
 that case, I guess SubRowCount should do nothing if there are no custom 
 columns or only work if at least one column has SpanSubrows1, or vice 
 versa.

Yes, I think it's impossible to make this work in all cases. As a
programmer you should know that using a subrowcount of 2, and a fixed-
column setting of 3 is impossible. Otoh we can build checks for that.

If SubRowCount=1, nothing will happen. (At least, that was my intention)

Joost
ps: I'll have a look at your project.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] IBConnection error in win64

2007-06-21 Thread Joost van der Sluis
On Wed, 2007-06-20 at 21:26 -0300, Carlos German Tejero wrote:
 I put the libmysql.dll in system32 and the application directory and
 the problem persist. When i connect with Con.Open; the application
 finish.

Can you tell what exception. (If it's 'invalid password' you know where
to look) And maybe give a backtrace?

Further I noticed that there are two mysql-dll's for 64 bit. One with
debug information and one without. You need the one without, the other
won't work.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Subrows in grids...

2007-06-20 Thread Joost van der Sluis
Hi Jesus and the rest,


Attached is a patch to allow 'subrows' in a row in a grid. You can say,
for example that each row should contain two subrows. Then the columns
will be divided over those two rows. Second you can specify for each
column how much subrows it has to 'span'.

For example, with two subrows, and a subrowspan of two for the first
column, you can get something like this:
http://menora.cnoc.nl/public/GridSubrows.png

Attached is a patch. It works reasonable, but there are still some
issues. For example if 'subrows mod columncount0' then no background
is painted for the 'empty' part. 

I also think that resizing columns and reordening them will give
problems.

But what do you guys think of the idea and patch?

Joost.
Index: grids.pas
===
--- grids.pas	(revision 11333)
+++ grids.pas	(working copy)
@@ -362,6 +362,7 @@
 FisDefaultFont: Boolean;
 FPickList: TStrings;
 FMinSize, FMaxSize, FSizePriority: ^Integer;
+FSpanSubRows: Integer;
 
 procedure FontChanged(Sender: TObject);
 function GetAlignment: TAlignment;
@@ -442,6 +443,7 @@
 property Title: TGridColumnTitle read FTitle write SetTitle;
 property Width: Integer read GetWidth write SetWidth stored IsWidthStored default DEFCOLWIDTH;
 property Visible: Boolean read GetVisible write SetVisible stored IsVisibleStored default true;
+property SpanSubRows: Integer read FSpanSubRows write FSpanSubRows stored IsVisibleStored default 1;
   end;
 
   TGridPropertyBackup=record
@@ -501,6 +503,7 @@
   ValidGrid: boolean; // true if there are not fixed cells to show
   AccumWidth: TList;  // Accumulated width per column
   AccumHeight: TList; // Accumulated Height per row
+  SubRow: TList;  // Place this column in subrow X
   TLColOff,TLRowOff: Integer;   // TopLeft Offset in pixels
   MaxTopLeft: TPoint; // Max Top left ( cell coorditates)
   HotCell: TPoint;// currently hot cell
@@ -534,6 +537,7 @@
 FFastEditing: boolean;
 FAltColorStartNormal: boolean;
 FFlat: Boolean;
+FSubRowcount: Integer;
 FTitleStyle: TTitleStyle;
 FOnCompareCells: TOnCompareCells;
 FGridLineStyle: TPenStyle;
@@ -702,7 +706,7 @@
 procedure ColRowExchanged(IsColumn: Boolean; index,WithIndex: Integer); dynamic;
 procedure ColRowInserted(IsColumn: boolean; index: integer); dynamic;
 procedure ColRowMoved(IsColumn: Boolean; FromIndex,ToIndex: Integer); dynamic;
-function  ColRowToOffset(IsCol, Relative: Boolean; Index:Integer;
+function  ColRowToOffset(IsCol, Relative: Boolean; Index:Integer; Col : integer;
  var StartPos, EndPos: Integer): Boolean;
 function  ColumnIndexFromGridColumn(Column: Integer): Integer;
 function  ColumnFromGridColumn(Column: Integer): TGridColumn;
@@ -904,6 +908,8 @@
 property VisibleColCount: Integer read GetVisibleColCount stored false;
 property VisibleRowCount: Integer read GetVisibleRowCount stored false;
 
+property SubRowCount: Integer read FSubRowcount write FSubRowcount default 1;
+
 property OnBeforeSelection: TOnSelectEvent read FOnBeforeSelection write FOnBeforeSelection;
 property OnCompareCells: TOnCompareCells read FOnCompareCells write FOnCompareCells;
 property OnPrepareCanvas: TOnPrepareCanvasEvent read FOnPrepareCanvas write FOnPrepareCanvas;
@@ -1313,6 +1319,7 @@
 property RowCount;
 property ScrollBars;
 property ShowHint;
+property SubRowCount;
 property TabOrder;
 property TabStop;
 property TitleFont;
@@ -1611,7 +1618,6 @@
   Count: Integer;
   aPriority, aMin, aMax: Integer;
   AvailableSize: Integer;
-  TotalWidth: Integer; // total grid's width
   FixedSizeWidth: Integer; // total width of Fixed Sized Columns
 begin
   if not AutoFillColumns then
@@ -1635,15 +1641,15 @@
 
 Count := 0;
 FixedSizeWidth := 0;
-TotalWidth := 0;
 for i:=0 to ColCount-1 do begin
   GetAutoFillColumnInfo(i, aMin, aMax, aPriority);
   AvailableSize := GetColWidths(i);
-  if aPriority0 then
-Inc(Count)
+  if aPriority0 then begin
+if PtrInt(FGCache.SubRow[i]) = 0 then
+  Inc(Count)
+end
   else
 Inc(FixedSizeWidth, AvailableSize);
-  Inc(TotalWidth, AvailableSize);
 end;
 
 if Count=0 then begin
@@ -2014,6 +2020,7 @@
   if IsColumn then begin
 AddDel(FCols, NewValue);
 FGCache.AccumWidth.Count:=NewValue;
+FGCache.SubRow.Count:=newValue;
 OldCount:=RowCount;
 if (OldValue=0)and(NewValue=0) then begin
   FTopLeft.X:=FFixedCols;
@@ -2041,6 +2048,7 @@
 FTopLeft.X:=0;
 AddDel(FCols, 1);
 FGCache.AccumWidth.Count:=1;
+FGCache.SubRow.Count:=1;
   end;
 end;
 SizeChanged(OldCount, OldValue);
@@ -2261,13 +2269,19 @@
   procedure CalcNewCachedSizes;
   var
 i: Integer;
+SubRow : PtrInt;
+C: 

Re: [lazarus] Subrows in grids...

2007-06-20 Thread Joost van der Sluis
On Wed, 2007-06-20 at 14:44 +0200, Graeme Geldenhuys wrote:
 That's an interesting idea. I believe I have seen 3rdParty Delphi grid
 components doing the same thing.  Based on you idea and screenshot.
 How would you access the cell selected in the screenshot?
 
 Grid.Cells[???] := 'My new text';

The colums are placed above/below each other. If you look at the
screenshot, Grid.Cells[1,1]='status 2' Grids.Cells[2,1]='jojojo3' and
Grids.Cells[3,1]='Laag'
While Grid.Cells[1,2]='status 3' Grids.Cells[2,2]='abcd2' and
Grids.Cells[3,2]='Hoog'

Joost


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Subrows in grids...

2007-06-20 Thread Joost van der Sluis
On Wed, 2007-06-20 at 17:36 +0200, Michael Van Canneyt wrote:
 
 On Wed, 20 Jun 2007, Joost van der Sluis wrote:
 
  Hi Jesus and the rest,
  
  
  Attached is a patch to allow 'subrows' in a row in a grid. You can say,
  for example that each row should contain two subrows. Then the columns
  will be divided over those two rows. Second you can specify for each
  column how much subrows it has to 'span'.
 
 Excellent idea;
 
 The only problem I see with this is in the DBGrid ?

I didn't test it. (The property isn't published in a dbgrid yet) But it
should work. I don't see why not. I implemented it this way, because
it's backwards-compatible, and 'transparent' for the TCustomGrid
descendents. (You don't have to change anything for it to work)

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] floating point overflow error when passing parameter value to TSQLQuery

2007-06-10 Thread Joost van der Sluis
 batches_microbs.batch= :kontrolnibroj;'
 )
 IndexDefs = 
 Params = 
   item
 DataType = ftString
 Name = 'kontrolnibroj'
 ParamType = ptInput
   end
 UpdateMode = upWhereKeyOnly
 UsePrimaryKeyAsKey = True
 ParseSQL = True
 left = 8
 top = 48
   end
   object SQLTransaction1: TSQLTransaction
 Active = True
 Database = PQConnection1
 left = 8
 top = 88
   end
   object Datasource1: TDatasource
 DataSet = SQLQuery1
 left = 8
 top = 128
   end
   object frDBDataSet1: TfrDBDataSet
 DataSet = SQLQuery1
 left = 8
 top = 200
   end   
  
 Regards,
  
 Zlatko
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Strange bug with SQLQuery.Close

2007-05-31 Thread Joost van der Sluis
On Thu, 2007-05-31 at 02:20 +0200, fedorax wrote:
 Selon Bram Kuijvenhoven [EMAIL PROTECTED]:
 
  fedorax wrote:
   Selon Joost van der Sluis [EMAIL PROTECTED]:
  
   On Sat, 2007-05-26 at 15:00 +0200, fedorax wrote:
  
   I've a strange bug. In this fonction ( Which was worked perfectly from
  few
   months an never chage ).
   --
   procedure TFunc_Sql.List_TablesSelectionChange(Sender: TObject; User:
   boolean);
   begin
 If List_Tables.ItemIndex0 then List_Tables.ItemIndex:=0;
 T_Name:=List_Tables.Items[List_Tables.ItemIndex]; // The selected 
   table
   name
 If SQLQuery.Active Then SQLQuery.Close; // Close the precedent query
 SQLQuery.SQL.Text:='Select * From '+ T_Name;
 SQLQuery.Open;  //Open to list in DbGrid
   end;
   --
   The line   If SQLQuery.Active Then SQLQuery.Close; cause an access
   violation
   and close the application without visible cause.
   My guess is that you've destroyed/freed SQLQuery somewhere before this
   code is called.
  
   Joost
  
   Not that, the SQLComponent is put on the form and no instruction exist for
  free
   it. Is it possible that a bug free a component without programmer ask to 
   it
  ?
 I do as you say and i put here the firts part of ( very long ) bakctrace. may 
 be
 somebody can understand this ? For me i just see a problem with a memory 
 pointer
 and i'm remember that memory pointer system ha'd changed few day's ago ( 
 Lazarus
 won't compile and stop in this fonction ). May be a bug was introduced at this
 time ?
 
 I'ts apear ever on the same line of code but never at the same time. Sometime 
 i
 can move move in list a long time before crash, sometime just two clicks in 
 list
  are sufficient to crash. And never on a specific location in the list.
 I forget to specify: The message 'access violation' and others appears  only 
 if
 the program is compiled with gdb active in options. Without gdb no message. 
 The
 program freeze and nothing is displayed.

It could be that it's fixed in r7538. Can you test?

Joost


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Strange bug with SQLQuery.Close

2007-05-29 Thread Joost van der Sluis
On Sat, 2007-05-26 at 15:00 +0200, fedorax wrote:

 I've a strange bug. In this fonction ( Which was worked perfectly from few
 months an never chage ).
 --
 procedure TFunc_Sql.List_TablesSelectionChange(Sender: TObject; User: 
 boolean);
 begin
   If List_Tables.ItemIndex0 then List_Tables.ItemIndex:=0;
   T_Name:=List_Tables.Items[List_Tables.ItemIndex]; // The selected table name
   If SQLQuery.Active Then SQLQuery.Close; // Close the precedent query
   SQLQuery.SQL.Text:='Select * From '+ T_Name;
   SQLQuery.Open;  //Open to list in DbGrid
 end;
 --
 The line   If SQLQuery.Active Then SQLQuery.Close; cause an access violation
 and close the application without visible cause.

My guess is that you've destroyed/freed SQLQuery somewhere before this
code is called.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] StringReplace - TReplaceFlags

2007-05-23 Thread Joost van der Sluis
It expects a set. Try:

StringReplace(s,'something','somethingElse',[rfReplaceAll]);

On Wed, 2007-05-23 at 17:35 +0200, Alvise Nicoletti wrote:
 Sorry but I really don't understand this:
 StringReplace(s,'something','somethingElse',rfReplaceAll);
 
 servizio_server.pas(65,39) Error: Incompatible type for arg no. 4: Got 
 enumeration type, expected TReplaceFlags
 
 What's that???
 
 Shouldn't that work?
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Release of fpc-2.1.4 aka 2.2.0-beta

2007-05-19 Thread Joost van der Sluis
Hello everybody,

I'm happy to announce that release 2.1.4 aka 2.2.0 beta is out. We ask
our users to test the changes made in the last few years. This beta will
be available for about two months, whereafter 2.2.0 will be released.
Helping us to test version 2.1.4 now, can avoid problems when you
finally update your fpc-version to 2.2.0.

Greetings

Joost
(on behalf of the whole FPC team)

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Image from SQL

2007-05-15 Thread Joost van der Sluis
Just use a decent backup, and not a generated sql-script.

On Tue, 2007-05-15 at 17:26 +0300, ik wrote:
 Many of the database backup and restore tools backup the data as sql dump.
 The binary image can not be restored as-is in that sql dump.
 I had a problem once that an hardrive collapse, and when I tried to
 restore the sql dump, it was unable to restore it because of that. So
 since then I learned from expirence :)
 
 Ido
 
 On 5/15/07, Sergio Samayoa [EMAIL PROTECTED] wrote:
  Why text?
 
  Database's software must provide backup  restore utilities which can handle
  binary data.
 
  -Mensaje original-
  De: ik [mailto:[EMAIL PROTECTED]
  Enviado el: Martes, 15 de Mayo de 2007 07:32 a.m.
  Para: lazarus@miraclec.com
  Asunto: Re: [lazarus] Image from SQL
 
  Hi,
 
  You are looking for blob. I recommand you to store the image a base64
  on a text blob rathet then a binary blob.
  The reason is simple.. backup and restore of data.
 
  Ido
 
  On 5/15/07, A.J. Venter [EMAIL PROTECTED] wrote:
   Hi all,
   I would like to be able to store images inside a postgresql table
   (inserted WITH a lazarus app) then retrieve them again and display
   them from inside a different lazarus app.
   XPM would do, but jpg would be ideal.
  
   I am guessing the process would be something like this:
  
   Inserting an image:
   Use a TImageSelect dialog to select the filename
   Load the file into a TStringList;
   SQL Insert TStringlist.Strings
   (Easiest way to get from file to string)
   What would be the best SQL type to store it as ? BLOB ?
  
   Retrieving:
   SQL Select Image
   Read the result into a string
   Store the string into a Tmemorystream
   TImage.LoadFromSTream(TMemoryStream)
  
   This brings up a few questions though:
   1) How can I store a string into a TMemoryStream ? I know that
   TStringList has a loadFromStream method - but how d I go the other way
   around ?
  
   Is there a BETTER way I should using ?
  
   A.J.
  
   --
   A.J. Venter
   CEO - OutKast Solutions C.C.
   http://www.outkastsolutions.co.za
   Cell: +27 83 455 9978
   Fax: +27 21 413 2800
   Office: +27 21 591 6766
  
   _
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives
  
 
 
  --
  http://ik.homelinux.org/
 
  _
   To unsubscribe: mail [EMAIL PROTECTED] with
  unsubscribe as the Subject
 archives at http://www.lazarus.freepascal.org/mailarchives
 
  _
   To unsubscribe: mail [EMAIL PROTECTED] with
  unsubscribe as the Subject
 archives at http://www.lazarus.freepascal.org/mailarchives
 
 
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Image from SQL

2007-05-15 Thread Joost van der Sluis
On Tue, 2007-05-15 at 13:15 +0200, A.J. Venter wrote:
 Hi all,
 I would like to be able to store images inside a postgresql table
 (inserted WITH a lazarus app) then retrieve them again and display
 them from inside a different lazarus app.
 XPM would do, but jpg would be ideal.
 
 I am guessing the process would be something like this:
 
 Inserting an image:
 Use a TImageSelect dialog to select the filename
 Load the file into a TStringList;
 SQL Insert TStringlist.Strings
 (Easiest way to get from file to string)
 What would be the best SQL type to store it as ? BLOB ?

If you have a blob-field, you can access it directly using a stream.
(It's even the fastest way - all other methods will also create a
stream, and convert it from there)

So no need for any string-conversions. Just use:

TImage.LoadFromStream(Dataset.CreateBlobStream(Field,bmread));

But why don't you use a TDBImage?

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] ide installation on ubuntu

2007-05-14 Thread Joost van der Sluis
You forgot the transaction. (What is the error you got?)

On Mon, 2007-05-14 at 15:14 +0200, Alvise Nicoletti wrote:
 Henry Vermaak ha scritto:
  On 14/05/07, Alvise Nicoletti [EMAIL PROTECTED] wrote:
 
  However: how difficult can it be to install zeos on lazarus for linux?
  I prefer to use light libraries like I did in the past and I like
  SQLdb... however i need to be sure that all works and it's stable...
 
 
  if you want something really light, just look at the example code
  under fpc/packages/base/mysql.  it calls the mysql libs directly.
 
  otherwise look at the examples under
  fpc.packages/fcl-db/src/sqldb/examples for the oo approach.
 
  remember to install the mysql*-dev packages (in ubuntu) to make sure
  they'll link.  also look at the database faq in the wiki.
 
  henry
 
  _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
 
 
 Thank you.
 You're talking about the cvs i suppose, I'll try to give a look at them.
 
 In the meantime I show you the code I'm using, just to ensure i'm doing 
 right:
 
 program alvise_servizio;
 
 uses baseunix, cthreads, SysUtils, mysql4conn, sqldb, db, mysql4, MySQLDB4;
 
 procedure daemon;
 var
   Connessione: TMySQL40Connection;
   Query:   TSQLQuery;
 
 begin
   Connessione:= TMySQL40Connection.Create(nil);
   Query:= TSQLQuery.Create(nil);
   Connessione.HostName:='localhost';
   Connessione.UserName:='un';
   Connessione.Password:='up';
   Connessione.Connected:=true;
 
   while (true) do begin
 sleep(1);
 WriteLn('bla bla');
   end;
 end;
 
 var
   pid: Tpid;
 
 begin
   WriteLn('hi! im a bad daemon!');
 
   pid:=fpfork;
   if (pid=0) then
 daemon;
 
 end.
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] create DB runtime

2007-05-07 Thread Joost van der Sluis
On Thu, 2007-04-26 at 14:13 +0200, Andrea Mauri wrote:
 Hi,
 it is possible to create a database at runtime using sqldb?
 How can I do it?

Use AConnection.CreateDB(...)

Joost



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLquery

2007-05-03 Thread Joost van der Sluis
Can you post the structure of those two tables. (Their create-
statement?)

On Thu, 2007-05-03 at 16:50 +0200, Andrea Mauri wrote:
 incorrect values within sqlda structure
 
 I got this error only if the DB is not empty, if the DB is empty the 
 query opens properly.
 I tested the same query with a SQL manager and using zeos components.
 In both cases it works properly.
 I build the query at runtime, it collects tens of float fields from 
 different tables and joined them.
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] listview example cannot be loaded in the IDE on win64

2007-04-16 Thread Joost van der Sluis
On Mon, 2007-04-16 at 09:02 +0200, Mattias Gaertner wrote:
 On Mon, 16 Apr 2007 08:49:53 +0200
 Mattias Gaertner [EMAIL PROTECTED] wrote:
  
  The trick itself is easy:
  TMethod contains two pointers: code (the address) and data (the
  TObject). Normally you assign both and everything works normally. But
  if you set only one of them nil, then the test AMethodnil
  still is true, but Assigned(AMethod) gives false.
  If all components always use if Assigned(AMethod) then AMethod(...),
  then this trick prevents calling the method at designtime, while still
  holding a pointer. The pointer can be used by the IDE to know, which
  method name to stream. 
  I don't remember which of the pointers are set to nil by Delphi.
  A quick test revealed: FPC's Assigned does not support this.
 
 On a second test: FPC works great. The nil works just the same as
 Assigned, which is IMHO even better. We can store a pointer in data
 and keep code nil.

A sidenote to the fpc-developers. Is this 'by design' so that it won't
change in the future. And if it's by design, it's maybe a good idea to
add a test for this, since it would be a problem if this is changed, and
no-one understands why Lazarus keeps crashing. ;)

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] PostgreSQL

2007-03-29 Thread Joost van der Sluis
On Thu, 2007-03-29 at 14:52 +0200, Bram Kuijvenhoven wrote:
 Darmawan Sugiarto wrote:
  It's OK... now I know If I don't have this error if I compile my code in 
  first time... but the second, third, and soon I have this error... So I 
  restart Lazarus and my code work clearly...
  If I run my exe (without lazarus) I don't have this error...
 
 Hmm, that's interesting. I also had problems with my (commandline) DB aware 
 app when running it from Lazarus (Win XP, pressing F9 in Laz): it would not 
 connect, but give me an exception instead. When starting it from Explorer or 
 the command prompt, all was fine.

Isn't that simply because the exception is caught in a try-finally
statement? Outside the debugger you don't notice that. 

It could be for example that if it fails finding libmysqlclient.so, it
tries mysqlclient.so ? (I don't know this for sure, but could the
problem be something like this?)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Strange behaviour of lazarus using fcl-web

2007-03-08 Thread Joost van der Sluis

I've isolated the problem. It occurs when inherited TDataModules are in
one file. According to Jesus Reyes (on IRC) did Mattias say that this
was on purpose.

That means that Lazarus doesn't work right with the current version of
fcl-web. So do I have to split up fcl-web into somewhat like 40 files,
or is there another/better way to solve this?

Joost.

ps: This kinds of explains the situation: http://imagebin.org/7552




On Thu, 2007-03-08 at 00:24 +0100, Joost van der Sluis wrote:
 Hi all,
 
 I've been looking for the problem for a few days now, and I can't find
 it. If I open the attached project, all kind of strange things happen.
 The streaminf of TFPWebComponent doesn't work, but I do not understand
 what's going wrong.
 
 If you open the project, it could go wrong, but not always. If you jump
 to the definition of TFPWebComponent, using the codetools, it'll ask if
 you want to close the component. If you do that, Lazarus crashes without
 any usefull information...
 
 I can't explain it very clear, since I have no idea what's happening.
 (It's unrelated to the fcl-breakup. The same problems occur with older
 versions of fpc) If someone could try, I would be pleased.
 
 Regards,
   Joost.
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Strange behaviour of lazarus using fcl-web

2007-03-08 Thread Joost van der Sluis
On Thu, 2007-03-08 at 22:43 +0100, Michael Van Canneyt wrote:
 On Thu, 8 Mar 2007, Joost van der Sluis wrote:
  
  I've isolated the problem. It occurs when inherited TDataModules are in
  one file. According to Jesus Reyes (on IRC) did Mattias say that this
  was on purpose.
  
  That means that Lazarus doesn't work right with the current version of
  fcl-web. So do I have to split up fcl-web into somewhat like 40 files,
  or is there another/better way to solve this?
 
 I had it initially working without this problem. 
 Why would having inherited TDatamodules in 1 file generate problems ?

I don't know. There was a hint that this could be the problem.

 That would mean that TForm/TCustomform descendents would also not work,
 and they at least used to work; I wrote articles about that, demonstrating
 how to use it ? 

I've followed one of those articles. And everything works fine. Until...
you close lazarus and open the project again. Then I've got this error.

 Has the IDE behaviour changed in this regard ?
  
  ps: This kinds of explains the situation: http://imagebin.org/7552
 
 from the picture:
 Is the source as it is in the unit generated by the IDE or did you modify it 
 ? 

I did modify it, to reproduce the problem as 'clean' as possible. If you
want to reproduce it using fcl-web, just create a cgi moduled
application with lazarus. Save everything and restart Lazarus. (I've
changed the lazarus-web-component to do this, by the way)

 The problem is then not in the fcl-web, but in the IDE support for it ?

Well, that depends on your point of view. ;)

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] StrToDate error

2007-03-01 Thread Joost van der Sluis
 That wasn't our experience with MS SQL Server 2000 which uses the US
 date/time format even though the server was installed in the UK with
 UK regional settings. We had similar issues (can't remember exactly
 what) with Firebird.  Hence the reason we now store it as strings.

Ok, so there's a bug in the data-layer, db-component or database-server
regarding TDateTime fields, so you decided to store it as a string?

If there's a bug regarding numerical fields, do you also store them as
strings? Or do you fix the bug? (Use another database-server?)

MS SQL stores date/time fields in a TDateTime format. (That's why it's
such a strange format.) Firebird uses something similar. The client-
library has to convert that. If that conversion goes wrong, that's
simply a a bug. But understandable, since if you use a simple 'select
datefield from table', without using parameters, it'll return the field
in a string-format, depending on the database-server settings, the
client settings and the connection/transaction settings. The program
which retrieves the field, should be aware of that. If it doesn't that's
just a bug.

It's exactly the same as with your solution: the application has to know
in which format the string comes. (in your case some iso-standard)
Only the 'build-in'-system is more flexible. You can set the format you
want yourself. (including your ISO-standard.) So instead of rewriting
everything in string-based fields, you could do a 'set
dateformat=iso' or something similar when you open a connection...

And third-party software can set it to their own needs...

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] StrToDate error

2007-03-01 Thread Joost van der Sluis
On Thu, 2007-03-01 at 12:04 +0200, Graeme Geldenhuys wrote:
 On 3/1/07, Joost van der Sluis [EMAIL PROTECTED] wrote:
 
  MS SQL stores date/time fields in a TDateTime format. (That's why it's
  such a strange format.) Firebird uses something similar. The client-
  library has to convert that. If that conversion goes wrong, that's
  simply a a bug. But understandable, since if you use a simple 'select
  datefield from table', without using parameters, it'll return the field
  in a string-format, depending on the database-server settings, the
  client settings and the connection/transaction settings. The program
  which retrieves the field, should be aware of that. If it doesn't that's
  just a bug.
 
 I clearly can't get my point across today.  :-)
 
 It was not a issue with the DB components we used at the time, but
 rather with our complex stored procedures and the amount of people
 that worked on the code.  Doing a normal select statement and
 displaying that date worked fine.  It was when we had to write stored
 procedures that generates dates based on special criteria and then use
 those dates to query data.  This happened often and trying to remember
 that the date format must be in a format you normally don't use
 obviously was a issue. ;-)

In stored procedures you should only use the internal-date-format, and
not any string-like value.

  Only the 'build-in'-system is more flexible. You can set the format you
  want yourself. (including your ISO-standard.) So instead of rewriting
  everything in string-based fields, you could do a 'set
  dateformat=iso' or something similar when you open a connection...
 
 Does this apply to code in stored procedures as well?  I would think
 it only works with whatever DB component you use.

Yes, this is handled by the database-server, so it's independent on the
used component.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Recent SVN lazarus won't compile. Can't find unit contnrs.

2007-02-27 Thread Joost van der Sluis
On Tue, 2007-02-27 at 16:14 +0100, Vincent Snijders wrote:
 [EMAIL PROTECTED] schreef:
  Hello,
  
  With FPC 2.1.1 SVN 6671 and Lazarus SVN 10693 compilation of lazarus abort 
  on
  this message:
  
  /usr/local/src/lazarus/lcl/graphics.pp(36,17) Fatal: Can't find unit contnrs
  
  I've try to downgrade to some others SVN versions. Same thing happen with 
  FPC
  2.1.1 SVN 6664 and Lazarus SVN 10685.
  
  With FPC 2.1.1 6610 and lazarus 10678 all work's.
  
  O.S Linux fedora core 6.
 
 This problem is likely to be caused by the restructuring of fpc directory 
 layout. 
 The fcl directory has been moved to the packages directory. I didn't dare to 
 update 
 yet.

Yup. I had the same problem. Log in as root and remove all files
in /usr/local/lib/fpc/2.1.1/i386-linux/* and then do a make install.

The 'old' fcl-packages are still in i386-linux/fcl and the new ones are
in i386-linux/fcl-base. That result in those troubles...

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] best use of components for mysql query insert performance benchmarking

2007-01-25 Thread Joost van der Sluis
On Mon, 2007-01-22 at 14:51 -0700, Seth Grover wrote:
 I'm writing a program to do some informal benchmarking of insert and
 query performance using various MySQL storage engines using MySQL
 5.1.x latest beta. I've got it up and running just fine using Lazarus
 and the MySQL components. It was a piece of cake.

Well. I'm not sure what you want to benchmark. If you're gonna compare
two servers, then it doesn't really matter how your code works. But if
you only want to show some fast numbers, you'd better don't use the
MySQL-components, since they only add an extra overhead-layer. 

If you want fast direct access, and filtering, iterating through
records, editing and such doesn't matter, you'de better use the MySQL-
api directly. (the unit mysqlXX, XX=40,41,50)  

How the api works can you find in the MySQL-documentation. They call it
the c-api.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] ZeosLib and Lazarus

2007-01-16 Thread Joost van der Sluis
On Tue, 2007-01-16 at 08:52 +0200, Graeme Geldenhuys wrote:

  The current problem is that it only is usable for daemons  long running
  programs with a patched 2.0.2 compiler (TDatasat Datetime patch)
 
 Can you explain this a bit more?  Why only usable for daemons and long
 running programs?

There's a memleak in 2.0.4 regarding interfaces, which are heavily used
by ZEOS. So if you need to run for a long time (like daemons,) 2.0.4
isn't stable enough. 2.0.2 is stable in this aspect, but it has more
TDataset-bugs, for which one they suggest to patch. 

 I'm currently merging and testing the ZeosLib persistence layer for
 the TechInsite tiOPF framework. Currently only against Firebird DB,
 but as soon as it passes all the unit tests, I'll start adding support
 for the other DB's as well.

I've been thinkink about using tiOPF for a project at work. But for that
I have to change it so that it can use SQLDB. That can't be that hard,
so maybe I\m gonna help you there.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus for Python (L4P)

2007-01-16 Thread Joost van der Sluis
On Tue, 2007-01-16 at 09:38 +1100, Algis Kabaila wrote:
 1.  **My** needs and plans.  I will say here only that the needs and plans 
 relate to the text that I am writing under the GPL.   A progress version 
 (beta?) of the text can be seen at 
 http://www.pcug.org.au/~akabaila/StructuralAnalysis.  It is a rehashed 
 university course text of an earlier book that I am co-author and the 
 surviving copyright holder.
 

I've read it and it's indeed a introduction to StructuralAnalysis, as I
was them when I was on the university myself. 

The only thing I don't understand what Python has to do with it. The
most lesson in computer science is maybe that you should use the right
tool for the right job. I find it rather strange that you write an
academical text on structural analysis, but combine that with an hobby-
like-text about Python.

If I want to analyse structure, I would use Pastran/Nastran or any other
tool which is designed for that. So if I read a book about structural
analysis, I expect it to explain a tool like Pastran/Nastra, and not a
Python-script.

If Patran is to specific, this kind of calculation should be done in
Matlap or an equivalent, imho. The only reason why one should use a real
programming language, is when speed comes around. (Although it's very
hard to do a matrix-operation faster then Matlab in any other language)

But when it comes to speed, you can't use Python. It's a script-
interpreter! Just like Matlab...

If you don't like C-like languages, because you like type-safe
programming, then use Pascal for things like this. And not Python. If
you use Python for these things, you simply 'go with the flow', follow
the hype and stopped thinking for yourself.

I read in your introduction about all computer-scientists writing their
first book - about Python. A right indication about the hype, I would
say.

Further one small remarks:
- Python isn't a programming language. Your introduction about Python
says: 'written in Python programming language. It is an interesting
interpreter'. Which is offcourse a contradiction in terminis. I guess
that you would never write something that stupid about structural
analysis in the book. (like: The structure is statically determinate, so
it can't be solved by equations of statics)

That about your choise for Python. But I think the idea of a GPL'ed text
about structural programming is a good idea.

About using Lazarus as a IDE for Python: some ppl here can react very
hostile to that idea. And that's for a reason. From time to time ppl
come here to tell us that Lazarus is great, but it's only a pity that
it's written/used for Pascal.

They do not understand that Lazarus is so great because it's written in
Pascal and used for Pascal...

Regards,
  Joost.





_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Patch for TDBImage and TDBMemo

2007-01-14 Thread Joost van der Sluis
Hi all,

The attached patch actually implements TDBImage and solves a problem
with TDBMemo when a dataset is closed.

Beware, it'll only work with sqldb from fpc 2.1.1, or maybe wit
ZEOS/tDbf. The patch solves bugs 1739 and 1477.

regards,
  Joost.
Index: include/dbmemo.inc
===
--- include/dbmemo.inc	(revision 10438)
+++ include/dbmemo.inc	(working copy)
@@ -98,6 +98,16 @@
   inherited ReadOnly:=not (FDataLink.Editing and FDBMemoLoaded);
 end;
 
+procedure TDBMemo.ActiveChange(Sender: TObject);
+begin
+  if FDatalink.Active then datachange(sender)
+  else
+begin
+Lines.Clear;
+FDataLink.reset;
+end;
+end;
+
 procedure TDBMemo.Notification(AComponent: TComponent; Operation: TOperation);
 begin
   inherited Notification(AComponent, Operation);
@@ -124,6 +134,7 @@
   FDataLink.Control:=Self;
   FDataLink.OnDataChange:[EMAIL PROTECTED];
   FDataLink.OnEditingChange:[EMAIL PROTECTED];
+  FDataLInk.OnActiveChange := @ActiveChange;
   FDataLink.OnUpdateData:[EMAIL PROTECTED];
   inherited ReadOnly:=True;
 end;
Index: include/dbimage.inc
===
--- include/dbimage.inc	(revision 10438)
+++ include/dbimage.inc	(working copy)
@@ -30,6 +30,13 @@
 begin
   Result:=FDataLink.Field;
 end;
+procedure TDBImage.Change;
+begin
+  //need to override this to make sure the datalink gets notified
+  //its been modified, then when post etc, it will call
+  //updatedata to update the field data with current value
+  FDataLink.Modified;
+end;
 
 function TDBImage.GetReadOnly: Boolean;
 begin
@@ -72,24 +79,107 @@
 
 procedure TDBImage.DataChange(Sender: TObject);
 begin
+  FUpdatingRecord := True;
   Picture.Graphic:=nil;
   FPictureLoaded:=False;
   if AutoDisplay then LoadPicture;
+  FUpdatingRecord := False;
 end;
 
 procedure TDBImage.UpdateData(Sender: TObject);
+
+var s: Tstream;
+fe   : String;
+i: Integer;
+
 begin
-  if Picture.Graphic is TBitmap then
-FDataLink.Field.Assign(Picture.Graphic)
+  if not assigned(Picture.Graphic) or (Picture.Graphic.Empty) then
+begin
+FDataLink.Field.Clear;
+end
   else
-FDataLink.Field.Clear;
+begin
+fe := Picture.Graphic.GetFileExtensions;
+s := FDataLink.DataSet.CreateBlobStream(FDataLink.Field,bmwrite);
+try
+  i := pos(';',fe);
+  if i  0 then fe := copy(fe,1,i-1);
+  s.WriteAnsiString(fe);
+  Picture.Graphic.SaveToStream(s);
+finally
+  s.Free;
+end;
+end;
 end;
 
+procedure TDBImage.ActiveChange(Sender: TObject);
+begin
+  if FDatalink.Active then datachange(sender)
+  else
+begin
+Picture.Clear;
+FDataLink.reset;
+end;
+end;
+
+procedure TDBImage.PictureChanged(Sender: TObject);
+begin
+  Inherited;
+  if not FUpdatingRecord then
+Change;
+end;
+
 procedure TDBImage.LoadPicture;
+
+var s: Tstream;
+GraphExt : string;
+gc   : TGraphicClass;
+AGraphic : TGraphic;
+
 begin
-  if not FPictureLoaded
-  and (not Assigned(FDataLink.Field) or FDataLink.Field.IsBlob) then
-Picture.Assign(FDataLink.Field);
+  if not FPictureLoaded then
+begin
+FUpdatingRecord := True;
+if not assigned(FDatalink.Field) then Picture.Assign(FDatalink.Field)
+else
+if FDatalink.field.IsBlob then
+  begin
+  if FDatalink.field is TBlobField then
+begin
+if FDatalink.Field.IsNull then
+  begin
+  Picture.Clear;
+  exit;
+  end;
+s := FDataLink.DataSet.CreateBlobStream(FDataLink.Field,bmRead);
+if s.Size = 0 then
+  begin
+  Picture.Clear;
+  exit;
+  end;
+try
+  GraphExt :=  s.ReadAnsiString;
+
+  gc := GetGraphicClassForFileExtension(GraphExt);
+  if assigned(gc) then
+begin
+AGraphic := gc.Create;
+AGraphic.LoadFromStream(s);
+
+Picture.Assign(AGraphic);
+end;
+finally
+  if assigned(AGraphic) then AGraphic.Free;
+  s.Free;
+end {try}
+
+end
+  else
+Picture.Assign(FDataLink.FField);
+
+  end;
+FUpdatingRecord := False;
+end;
 end;
 
 procedure TDBImage.Loaded;
@@ -109,6 +199,8 @@
   FDataLink.Control:=Self;
   FDataLink.OnDataChange:[EMAIL PROTECTED];
   FDataLink.OnUpdateData:[EMAIL PROTECTED];
+  FDataLInk.OnActiveChange := @ActiveChange;
+  FUpdatingRecord := False;
 end;
 
 destructor TDBImage.Destroy;
Index: extctrls.pp
===
--- extctrls.pp	(revision 10438)
+++ extctrls.pp	(working copy)
@@ -528,8 +528,8 @@
 procedure SetProportional(const AValue: Boolean);
 procedure SetStretch(Value : Boolean);
 procedure SetTransparent(Value : Boolean);
-procedure PictureChanged(Sender : TObject);
   protected
+procedure PictureChanged(Sender : TObject); virtual;
 

Re: [lazarus] illegal qualifier problem arose to a newbie

2007-01-13 Thread Joost van der Sluis
On Sat, 2007-01-13 at 14:24 +0200, Sönmez Kartal wrote:
 Hello,
 
 I am new to Lazarus. I have a book named Mastering Delphi 7 by Marco 
 Cantu. I got an error when I tried to compile an example.
 
 procedure TDateForm.FormCreate(Sender: TObject);
 begin
TheDay := TDate.Create();
TheDay.SetValue(2007,1,13);
 end;

Well, this won't compile in Delphi either. First of all you'll need to
define the TheDay variable. Secondly, I don't know any object-type (so
that you can call it's constructor create) which is called TDate.

So probably Marco Cantu has defined his own class TDate, and defined a
variable TheDay somewhere. (Probably somewhere in TDateForm?)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus makefile

2007-01-08 Thread Joost van der Sluis
On Mon, 2007-01-08 at 13:40 -0200, Flávio Etrusco wrote:
 On 1/7/07, Mattias Gaertner [EMAIL PROTECTED] wrote:
  On Sun, 07 Jan 2007 21:07:03 +0100
  Joost van der Sluis [EMAIL PROTECTED] wrote:
 
   Hi all,
  
   I have some questions about the Lazarus Makefile's.
  
   First: why is lazarus installed in share?
 
  Historical reasons. Many programs are installed there under linux.
 
 
   /usr/share is hard-coded in
   Makefile.fpc, and so it's hard to change. But since there's compiled
   code in lazarus, I would say that /usr/lib is the right place...
 
  Yes, at least the linux FHS seems to suggests this.
 
 
 IIRC the right place for installations not handled by the package
 manager is /usr/local? (/usr/local/lib in this case)

That's why I only mentioned 'share' and 'lib'. Since I'm working on a
package for Fedora Extras, it will be /usr/lib. The rpm provided by 'the
lazarus-team' should use /usr/local/lib.

Joost


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Lazarus makefile

2007-01-07 Thread Joost van der Sluis
Hi all,

I have some questions about the Lazarus Makefile's.

First: why is lazarus installed in share? /usr/share is hard-coded in
Makefile.fpc, and so it's hard to change. But since there's compiled
code in lazarus, I would say that /usr/lib is the right place...

Second: If I change /usr/lib in Makefile.fpc and run fpcmake, that works
fine, but not on dual 32/64 bit linux systems. In that case it should
be /usr/lib64. Any idea how to solve this, except by using two
makefile.fpc's?

Joost.


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLDB TIBConnection

2007-01-04 Thread Joost van der Sluis
On Wed, 2007-01-03 at 21:15 -0500, Lee Jenkins wrote:
 Kevin hayton wrote:
  
  I have just installed UIB components and there are components on the 
  palette.
  Using MEPIS 6.0 and lazarus 0.9.20 beta. Just downloaded the latest UIB 
  extracted to /usr/share/lazarus/components and installed the .lpk in 
  /source.
 
 Man, that is so odd.  I did essentially the same thing except all my 
 stuff was installed in /usr/lib/lazarus/coponents.  Same thing with lpk.

Ergo: you've installed lazarus TWICE. You were installing in one of
them, but you started the other one.

(one in /usr/lib/lazarus, and one in /usr/lib/shared)

Next question is: which distro do you use? If it's FC, you probably
installed the rpm provided by fedora, which installs
in /usr/lib/lazarus. But the rpm you can download on the lazarus website
installs to /usr/shared/lazarus

 And everything looked like it compiled fine too, at least no visible 
 errors that I could see.

I still find it stranghe, though, that he can't find the firebird-
client-library. But I think you've installed something else wrongly..

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SQLDB TIBConnection

2007-01-04 Thread Joost van der Sluis
On Thu, 2007-01-04 at 09:09 -0500, Lee Jenkins wrote:
 Joost van der Sluis wrote:
  On Wed, 2007-01-03 at 21:15 -0500, Lee Jenkins wrote:
  Kevin hayton wrote:
  I have just installed UIB components and there are components on the 
  palette.
  Using MEPIS 6.0 and lazarus 0.9.20 beta. Just downloaded the latest UIB 
  extracted to /usr/share/lazarus/components and installed the .lpk in 
  /source.
  Man, that is so odd.  I did essentially the same thing except all my 
  stuff was installed in /usr/lib/lazarus/coponents.  Same thing with lpk.
  
  Ergo: you've installed lazarus TWICE. You were installing in one of
  them, but you started the other one.
 
 No, I installed twice, but the second time only after uninstalling the 
 first.  I don't have two separate installations.
 
  (one in /usr/lib/lazarus, and one in /usr/lib/shared)
  
 
 The only installation that I have is in /usr/lib/lazarus.  There is no 
 /usr/lib/shared directory, et al or even as I think you mean, 
 /usr/share/lazarus either.
 
  Next question is: which distro do you use? If it's FC, you probably
  installed the rpm provided by fedora, which installs
  in /usr/lib/lazarus. But the rpm you can download on the lazarus website
  installs to /usr/shared/lazarus
  
 
 I am using CentOS4.4 and I installed the following from sourceforge:
 fpc-2.0.40-i586.rpm
 fpc-src-2.0.4-0.i386.rpm
 lazarus-0.9.0.20-0.i386.rpm

Which is strange, since this rpm installs in /usr/local/share... Not lib


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Can not load MySQL Client

2006-12-12 Thread Joost van der Sluis
Do you actually have the file 'libmysql.dll' on your computer? If so,
place it in your system32-directory, or in the same directory as the
executable you're running.

On Tue, 2006-12-12 at 16:43 +0700, Ferry Setiawan wrote:
 I try connect to mysql database using TMySQLConnection, but there is an 
 error said Can not load MySQL Client. Is it Installed? (libmysql.dll). 
 and i already installed mysql at my computer.
 Can anybody tell me why?
 
 Thanks and regards
 
 Ferry S
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


RE: [lazarus] Gambas

2006-12-01 Thread Joost van der Sluis
On Fri, 2006-12-01 at 21:13 +0200, George Birbilis wrote:
   (for example when you launch Lazarus [if you don't tell it to open
   something], is there option to autostart with the File/New dialog?
   [that should be the default option and have checkbox to not
  show that
   at start again]).
 
  I don´t particularly consider this an advantage. Do you
  really start a new project everytime you open the IDE? The
  most common thing to do when opening the IDE is to keep
  writing your previous project or open another project.
 
 Have you seen the new Turbo Delphi or VS.net for example? It has a start
 page with common actions, info for the newcomer etc.

As it is now, a newcomer can start to use the IDE immediately, since the
IDE creates a new project for him by default!

Start the ide, and then choose run. That'll work. Easier than that is
impossible. If he wants to do more, he's more advanced, and won't have
any troubles in finding the 'new project' option in the menu.

I aggree that we should make things as easy as possible, but out
audience are developers, not first-time-computer-users.

btw: remove you're 'reply to', please. else the consequence will be that
I won't answer your mails anymore.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] diff between FPC 2.11 and 2.04

2006-11-09 Thread Joost van der Sluis

All changes that were available and tested at the time that 2.0.4 was
released, were merged to 2.0.4. Effectively one fix wasn't merged. 

But the changes since 2.0.4 was released, didn't make it into 2.0.4,
offcourse.

On Wed, 2006-11-08 at 08:32 -0800, johnf wrote:
 Hi,
 
 I know that FPC 2.04 is the stable release.  But if I recall SQLDB was not as 
 advanced in 2.0x and it is in 2.1.x.  Is this correct?  Or has all the 
 SQLDB stuff been back ported to 2.04.
 
 Thanks
 
 John
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] version of TmySQLConnection

2006-11-09 Thread Joost van der Sluis
On Thu, 2006-11-09 at 16:32 +0700, Bisma Jayadi wrote:
  It is, but:
  1. It will take some additional work.
 
 If we keep them separated, it will take some additional works to users 
 (programmers), especially if he wants to make an application which connects 
 to 
 several mySQL databases with different version. ;)

If you - as programmer - want to do that, you simply can: detect the
installed mysql-CLIENT-version at startup, and then create the right
TMySQLconnection for that version.

But, I can not state this enough, if you want to do such things, simply
don't use MySQL. Not al combinations of MySQL-Clients and server
versions can work together. You, as programmer, can't do anything about
that. And, the MySQL-developers don't/won't/can't guarantee that it will
work with newer MySQL-versions.

If you want interoperatibility between versions of the DB-server, use
Firebird, PostgreSQL, Oracle or ODBC. The development of these databases
is much further, and their clients and ABI's has been stabalised years
ago.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] MySQL components and MySQL 5.1.xx

2006-10-30 Thread Joost van der Sluis
On Mon, 2006-10-30 at 17:49 +0100, Michael Van Canneyt wrote:
 
 On Mon, 30 Oct 2006, Seth Grover wrote:
 
  Before I dig in and spend a lot of time trying to figure out what's
  going on here, I thought I'd save the legwork ask to see if someone
  else has tried to do this.
  
  My question: will the TMySQL50Connection component work with a MySQL
  5.1 (I think I'm running the 5.1.11 beta) server?
 
 A good and just question, to which we'd also like to know the answer :-)

the MySQL-developers said that they would better their lives, so there's
hope... ;)
btw: the biggest issue is if you can use the mysql5.1 client, the server
doesn't matter much.

  I modified the example at
  http://wiki.lazarus.freepascal.org/index.php/MySQLDatabases to use a
  MySQL50Connection object. It looks like I can connect to the database,
  but when the demo tries to do the show databases query, I get an
  error from MySql which says You have an error in your SQL syntax;
 
 IMHO: 
 That's because there is no 'show databases' SQL statement. 
 This is a fake SQL statement in the mysql command line utility, 
 which uses a native API call mysql_list_dbs.
 
 Same for the 'show index' statements.

But as they are used frequently in MySQL, I build some exceptions in so
that it should work. The 'show index' is there if you have
tsqlquery.parsesql set to true. Try to set it to false.

But nonetheless, it's a bug, so please provide a bug-report.

 So I think the example in the wiki should be modified to show something else.

That would be better, yes.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] MySQL Components

2006-10-19 Thread Joost van der Sluis
On Thu, 2006-10-19 at 00:02 +0200, Michael Van Canneyt wrote:
 
 On Wed, 18 Oct 2006, Terry A Haimann wrote:
 
  My real question is how do you execute in the sql in these fields?  Is
  there some sort of hook, like maybe from the dbnavigator?
 
 They are used automatically when you execute the dataset's Delete and 
 Post methods ?

Not exactly. On a call to .delete or .post the changes are stored in an
update-buffer. If ApplyUpdates is called, it executes the appropiate
queries. First it tries the provided queries, if there aren't any
queries provided, it tries to use the ones which are generated by the
sql-parser, based on the select-statement.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] oracle

2006-10-18 Thread Joost van der Sluis
On Wed, 2006-10-18 at 09:29 +0200, Vincent Snijders wrote:
 Michael Van Canneyt schreef:
  
  On Wed, 18 Oct 2006, Adrian Maier wrote:
  
  That's simply because it is not registered. You can add the registration
  yourself: open registersqldb.pas in lazarus/components/sqldb,
  add oracleconnection to the uses list, and add the following
TOracleConnection,
  before the line with TPQConnection, which is line 61.
  
 
 Is the TOracleConnection part of fpc 2.0.4? Then we can add it to the Lazarus 
 source 
 as soon as we have a icon for the component bar.

It is.

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Advice about creating database-aware application with Lazarus

2006-10-09 Thread Joost van der Sluis
On Mon, 2006-10-09 at 14:05 +0300, Adrian Maier wrote:

 I have a form that includes:  a TdbGrid and a TdbNavigator.  I want to
 use the same
 form to acces any of three different tables,  by specifying one sql
 query or another.
 - deleting rows doesn't work for any of the tables.  The user is asked
 to confirm, but
   the row is not deleted.
 - updating works , for the tables that have a simple primary key
 - for the table that has a 3-column primary key,  i have been able to
 specify a custom
   sql command .  The update reaches the database, but the transaction
 is no longer
   committed.   The same save button commits the data for the other
 tables, though.

Are you sure all queries has the same transaction?

 I'm not sure whether the problem is only my lack of knowledge,  or the
 support for
 PostgreSQL is simply not mature enough.

I would guess it's both.

 I suspect that working with Firebird is
 better supported, because i have noticed that people around here tend
 to use firebird.

The problem that you encountered so far, weren't postgres-related. So
switching to fb won't help much.

 So, i have several questions:
 a. Are there Lazarus users who have positive experience with
 developing data-aware
 applications using sqldb to access PostgreSQL?
 
 b. Are there any better solutions (except sqldb) to access PostgreSQL?
  It is hard to
 find documentation about sqldb, except from the source code and a set
 of examples.
 
 c. What is the approach that I should follow : should I consider
 dealing with the database
 manually?  Simply associating a TdbGrid with a TsqlQuery is far from
 working out-of-the-box
 (at least with sqldb and postgres) .

Just submit bug-reports. There are so many things you can do with the
database-utils, it's impossible to check them all. For some it will work
out-of-the-box, for others it oculd be somewhat more difficult.
Multiple-fields-primary keys, for example, I consider as a bad design.
(I can imagine some exceptions, but those are really rare) Must db-
programmers won't use them, so for them it works 'out-of-the-box'...

Just submit bug reports if you found them, and ask here for help. That's
probably the best you can do, and the best for fpc/lazarus.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: AW: [lazarus] Advice about creating database-aware applicationwith Lazarus

2006-10-09 Thread Joost van der Sluis
On Mon, 2006-10-09 at 20:45 +0200, Christian Ulrich wrote:
  Multiple-fields-primary keys, for 
  example, I consider as a bad design. (I can imagine some 
  exceptions, but those are really rare) 
 
 Why ? I have at example an article table wher the primary key consists
 of 
 article number + version + language
 
 Why an primary key that consists of these 3 fields is not an good idea
 ??

Because an primary index on one field is always faster. You could also
add ean extra index on those three fields.

Well, except, if the only thing you do is searching the database using
that three-field-primary key. So, if you also want to search for an
article-number plus a language, but without a version, it's not
effective anymore, or if you want to sort on version 

Joost.



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: AW: [lazarus] Advice about creating database-aware applicationwith Lazarus

2006-10-09 Thread Joost van der Sluis
On Mon, 2006-10-09 at 20:55 +0200, Vincent Snijders wrote:
 Christian Ulrich wrote:
 Multiple-fields-primary keys, for 
 example, I consider as a bad design. (I can imagine some 
 exceptions, but those are really rare) 
  
  
  Why ? I have at example an article table wher the primary key consists
  of 
  article number + version + language
  
  Why an primary key that consists of these 3 fields is not an good idea
  ??
  
 
 Because if you want to use that article in order item table or a bill of 
 materials table, you need to add 3 fields as foreign key.

Oh, yes. That also. ;)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Advice about creating database-aware application with Lazarus

2006-10-09 Thread Joost van der Sluis
On Mon, 2006-10-09 at 15:46 -0400, Adrian Maier wrote:
 On 10/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 
  On Mon, 9 Oct 2006, Adrian Maier wrote:
 
   On 10/9/06, Christian Ulrich [EMAIL PROTECTED] wrote:
   
 - deleting rows doesn't work for any of the tables.  The user is asked
 to confirm, but the row is not deleted.
   
maybe its deleted and not drawn in the dbgrid ??
  
   Nope.  I am monitoring all the commands that are sent to the database,
   and I haven't seen any DELETE.
   Also, after restarting the program the row is still there. I'm pretty sure
   that
   for some reason the delete command is not executed at all.
 
  Did you call applyupdates ?
  I think SQLQuery does some buffering of commands ?
 
 Yes:  I have a save button that does:
 query1.ApplyUpdates;
 Ftransaction.CommitRetaining;

Well... As I read it, that's not the problem. All changes are made in an
update-buffer first. So if you do a 'delete' in the grid, the records
get deleted in that buffer. Thus the record should disapear immediately
in the grid. But not yet on the database.

The 'delete'-sql is only send to the database on the .applyupdates
command. And committed on the .commitretaining. Thus that can happen
much later. (on the click on the 'save' button)

But if I understood you correctly, the delete fails immediately. That
means that there's a problem in the deletion of records in a grid. Or in
the .delete from Tbufdataset. You first have to test that. Easiest way
is to add a button 'delete' which does sqlquery1.delete. That'll delete
the current record, and it should be immediately visible in the grid.
Else you could do a .refresh after the .delete, to be sure that the grid
gets refreshed. (If not, it's a bug, btw)

Then we know who has to look at the problem, me or Jesus. ;)

Joost.



_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: AW: [lazarus] Advice about creating database-aware applicationwith Lazarus

2006-10-09 Thread Joost van der Sluis
On Tue, 2006-10-10 at 00:13 +0200, Christian Ulrich wrote:
 Joost van der Sluis schrieb:
  On Mon, 2006-10-09 at 20:55 +0200, Vincent Snijders wrote:

  Christian Ulrich wrote:
  
  Multiple-fields-primary keys, for 
  example, I consider as a bad design. (I can imagine some 
  exceptions, but those are really rare) 
  
  Why ? I have at example an article table wher the primary key consists
  of 
  article number + version + language
 
  Why an primary key that consists of these 3 fields is not an good idea
  ??
 

  Because if you want to use that article in order item table or a bill of 
  materials table, you need to add 3 fields as foreign key.
  
 how you select one version from another in the orders table when you 
 havend an field for that
 i must add always all 3 fields

I don't say that it isn't usefull here. I have no clue what you're doing
with that table. I only try to explain the bigger picture.

 and an primary key is for me the security that the article number or 
 these article dont exist twice
 and my data is corrupted, that hasend to do somethig with indexes
 data integrity comes first for me then comes speed maybe an index with 3 
 fields makes no sense
 but an key ...

Add a primary key, and add an index on the three fields which doesn't
allow double values. Such a restriction isn't restricted to primary
keys. So your data-integrity doesn't come in danger. 

 and i can also specify secondary indexes on fields in an primary key 
 cant i ?!

Yes, but it wil map that secondary index on the primary index, which is
big, since it contains three fields- inefficient. You could better do
it the other way around.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] How to debug when accessing database with sqldb

2006-10-06 Thread Joost van der Sluis
On Fri, 2006-10-06 at 14:33 +0300, Adrian Maier wrote:
 On 10/6/06, Adrian Maier [EMAIL PROTECTED] wrote:
  On 10/6/06, Adrian Maier [EMAIL PROTECTED] wrote:
   On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote:
   I'm using Sqldb to access a PostgreSQL database.  Is it possible 
   to find out
   easily what sql commands is sqldb generating and trying to 
   execute ?
  
   I have a DBgrid which is associated to a table.
   After updating a row and executing query.ApplyUpdates  , the 
   program generates
   an exception :
   An error occurred while applying the updates in a query: 
   preparation of query
   failed. (PostgreSQL: ERROR: syntax error at end of input at 
   character 132). 
  
   
What you could do: compile the sqldb-unit with debuginfo and place a
breakpoint on line 1181. And then take a look at qry.sql.text. Or simply
place a 'writeln(qry.sql.text);' on that line. Recompile fpc and try
again...
  
   I was hoping that recompiling sqldb wasn't neccessary .  But if there's no
   other way ...
 
 
  I have added some writelns inside pqconnection.pp just before the
  PQexec calls.
  The query that causes the error is :
 
  ' prepare prepst2 (int,int,numeric,text,int,text,int) as update PROD
  set mag=$1,cod=$2,pu=$3,den=$4,p_vinz=$5,um=$6,stoc_ini=$7 where '
 
  Which is incomplete...   It looks liek it wasn't able to detect the columns 
  that
  form the primary key.   This table has a PK made up of 3 columns.
 
  Can sqldb handle multi-column primary keys ?
 Apparently it doesn't  :-(  or it doesn't work for postgres.

Indeed. Somewhere in the code there's a comment like: 'ToDo: Multiple
fields-indexes should be parsed here...' 

 Replacing the 3-columns primary key   with a single-column primary key caused
 the problem to disappear.

Could you write a bug-report for it? Also mention that it should
generate an error, if something like this happens. Instead of sending
incomplete requests to the db-server.

As a temporary solution you can do:

sqlquery1.updatesql := 'update PROD set mag=$1,cod=$2,pu=$3,den=
$4,p_vinz=$5,um=$6,stoc_ini=$7 where ...';

But then complete, offcourse. That way it doesn't try to generate the
update-query automatically, but it uses the query that you provide.


-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] How to debug when accessing database with sqldb

2006-10-05 Thread Joost van der Sluis
On Thu, 2006-10-05 at 17:19 -0400, Adrian Maier wrote:
 On 10/5/06, Joost van der Sluis [EMAIL PROTECTED] wrote:
   I'm using Sqldb to access a PostgreSQL database.  Is it possible to find 
   out
   easily what sql commands is sqldb generating and trying to execute ?
  
   I have a DBgrid which is associated to a table.
   After updating a row and executing query.ApplyUpdates  , the program 
   generates
   an exception :
   An error occurred while applying the updates in a query: preparation of 
   query
   failed. (PostgreSQL: ERROR: syntax error at end of input at character 
   132). 
  
   Enabling the statement logging in postgres doesn't help in this case,
   because the
   sql command is not recognised at all,  and therefore it doesn't show
   up in the log.
 
  It's more then 132 characters long, so it should be in the log?
 The size is not important. I meant that i've configured postgres to
 write in the log
 all the queries that are executed, for debugging. Yet,  the query
 which generates
 the error is not recognized as a query at all,  and only the error
 appears in the
 log.

Can't you specify to log all the commands which are sent?

  Since it's with applyupdates. The SQL is probably parsed incorrectly.
  You can look what the updatequery.sql, modifyquery.sql etc. are. Maybe
  that that already reviels the problem.
 
 I'm afraid that i still don't understand how can I see those queries.
  What/where
 are  the update.sql, modifyquery.sql  that you are referring to?

Seems that they aren't public.

What you could do: compile the sqldb-unit with debuginfo and place a
breakpoint on line 1181. And then take a look at qry.sql.text. Or simply
place a 'writeln(qry.sql.text);' on that line. Recompile fpc and try
again...

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] LCL app (fpcUnit tests) with Clipboard features from console

2006-10-04 Thread Joost van der Sluis
On Wed, 2006-10-04 at 14:57 +0200, Graeme Geldenhuys wrote:
 On 04/10/06, Vincent Snijders [EMAIL PROTECTED] wrote:
  I am not sure, if I understand it all but these are your dependencies:
 
  TClipboard needs a working widgetset interface, so you need to add the 
  interfaces unit.
  The interfaces unit needs a display, so you need to have an X server. You 
  can set
  the display using the environment variable DISPLAY or maybe with a 
  parameter, run a
 
 Up till here is exactly correct.  Not running a X Server and just
 setting the environment variable DISPLAY=:0 doesn't make TClipboard
 work, I tried it. :-)  So it seems the X Server must run.
 
 I have even logged into X Windows with my username (the same as gets
 used for the cronjob), and left the session open over night.  Thinking
 that it would work. Nope!  It seems I need to somehow get the cronjob
 executing inside the X Server session.  I can remeber if I tried
 leaving the X Server running and setting the DISPLAY environment
 variable in the cronjob build script.

If you do that, you have to give other processes permission to use your
display. You can do that with the 'xhost +' command. 

Joost


_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Why does this crash ?

2006-09-19 Thread Joost van der Sluis
 TZC_Settings.GetCurrencySymbol : String;
  Begin
   LoadFromDB;
   GetCurrencySymbol := FCurrencySymbol;
  end;
 
  Function TZC_Settings.GetUnitLength : Integer;
  Begin
   LoadFromDB;
   GetUnitLength := FUnitLength;
  end;
 
  Function TZC_Settings.GetPricePerUnit: Real;
  Begin
   LoadFromDB;
   GetPricePerUnit := FPricePerUnit;
  end;
 
  Procedure TZC_Settings.SetCurrencySymbol(NewSymbol:String);
  Begin
   FCurrencySymbol := NewSymbol;
   SaveToDB;
  end;
 
  Procedure TZC_Settings.SetUnitLength(NewLength:Integer);
  Begin
   FUnitLength := NewLength;
   SaveToDB;
  end;
 
  Procedure TZC_Settings.SetPricePerUnit(NewPrice : Real);
  Begin
  FPricePerUnit := NewPrice;
  SaveToDB;
  end;
 
  initialization
 
 
  end.
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Why does this crash ?

2006-09-19 Thread Joost van der Sluis
On Tue, 2006-09-19 at 11:03 +0200, A.J. Venter wrote:
 On Tuesday 19 September 2006 10:47, Joost van der Sluis wrote:
  Run it in a debugger and tell us on which line it crashes?
 The backtrace says it crashes on line 96 - the mysql_query call, I ran it 
 through gdb and got the following output:
 
 (gdb) run
 Starting program: /tmp/project1
 [Thread debugging using libthread_db enabled]
 [New Thread 16384 (LWP 10618)]
 
 Program received signal SIGSEGV, Segmentation fault.
 [Switching to Thread 16384 (LWP 10618)]
 0x40321a08 in mysql_slave_send_query () from /usr/lib/libmysqlclient.so.14

Probably a mysql-version-problem, or you confused pointers and variables
a bit.

  And you're using the mysql4 unit. You know what the consequences are?
  What's the version of you're mysql-client?
 Consequences ? I understood that you needed mysql4 for versions after 
 mysql-version 3.
 I have mysql version 4.1.13.
 Should I be using a different unit name ?

mysql41

mysql4 is for mysql 4.0 only, and only exist for backwards-
compatibility. Please use mysql40, mysql41 or mysql50

  (And ask yourself: do I really want to use mysql?)
 This one I haven't got much choice over. It has to be a network transparent 
 SQL server, and it has to be something just about every distro comes with, 
 and which people know how to use - and some of the component parts will quite 
 possible be written in other languages like PHP (this isn't fixed but quite 
 likely).

Every self-respecting distribution has postgres for real users, and
mysql for the weenies.

And your customers, do you think they like it that if they upgrade their
workstations, they have to ask you for a newer version of your program?

You'll have to distribute executables for every mysql-version there is
and will be

For start I would use the dynamically loaded units. (mysqlxx_dyn)

And for more info about why you shoudn't use mysql, or a more detailed
explanation about the problem above, search for mails from me on this
maillinglist.


  On Tue, 2006-09-19 at 10:13 +0200, A.J. Venter wrote:
   Mmm,
   So does nobody know what I'm doing wrong ? Or is it not a problem in my
   code ? Any idea what I should check ?
  
   A.J.
  
   On Monday 18 September 2006 15:17, A.J. Venter wrote:
I have just started on a new project, which is mysql backed - beginning
with a fairly abstract unit which a large number of different lazarus
programs will use to communicate with the DB.
   
But I ran into a very strange problem quite early on, I can connect to
the DB without hassles, but as soon as I try to do a query - I get a
crash, and I have no idea why... :S
   
My current test calls look like this:
   
ZC_DBConnect;
ZC_Settings : TZC_Settings.Create;
Writeln(ZC_Settings.GetPricePerUnit);
   
TraceBack says it's crashing on line 96:
  if (mysql_query(socket,pchar(Query))  0) then
   
   
The unit in full goes:
unit libzybacafe;
   
{$mode objfpc}{$H+}
   
interface
   
uses
  Classes, SysUtils,dialogs,mysql4;
   
procedure ZC_DBConnect;
Function ZC_DBQuery(Query:String):PMYSQL_RES;
   
type
  TZC_Settings = class
  private
   {Private Declarations}
 FCurrencySymbol : String;
 FUnitLength : Integer;
 FPricePerUnit : Real;
 FResult : PMySQL_RES;
 FRow: MYSQL_ROW;
 Procedure LoadFromDB;
 Procedure SaveToDB;
public
{ public declarations }
 Function GetCurrencySymbol : String;
 Function GetUnitLength : Integer;
 Function GetPricePerUnit: Real;
 Procedure SetCurrencySymbol(NewSymbol:String);
 Procedure SetUnitLength(NewLength:Integer);
 Procedure SetPricePerUnit(NewPrice : Real);
  end;
   
Var
 Socket : PMysQL;
   
implementation
   
procedure ZC_DBConnect;
Var
DBCFG : TSTringList;
I : Integer;
H,U,P,D : String;
  qmysql : TMYSQL;
  alloc : PMYSQL;
   
Begin
DBCFG := TSTringList.Create;
Try
{$IFDEF Unix}
   DBCFG.LoadFromFile('/etc/zybacafe.cfg');
{$ENDIF}
{$IFDEF Win32}
   DBCFG.LoadFromFile('C:\Program Files\ZybaCafe\zybacafe.cfg');
{$ENDIF}
except
  ShowMessage ('Error Loading database configuration !');
  Halt;
end;
For I := 0 to DBCFG.Count -1 do
begin
 If pos('HOST=',uppercase(DBCFG[I]))  0 then
begin
 H := DBCFG[I];
 Delete(H,1,pos('=',H));
end;
 If pos('USERNAME=',uppercase(DBCFG[I]))  0 then
begin
 U := DBCFG[I];
 Delete(U,1,pos('=',U));
end;
 If pos('PASSWORD=',uppercase(DBCFG[I]))  0 then
begin
 P := DBCFG[I];
 Delete(P,1,pos('=',P));
end;
 If pos('DATABASE=',uppercase(DBCFG[I]))  0

Re: [lazarus] Why does this crash ?

2006-09-19 Thread Joost van der Sluis
On Tue, 2006-09-19 at 11:14 +0200, A.J. Venter wrote:
 Okay I did a bit of looking around.
 It seems there are different units for every single mysql version in the 
 world - and ipso facto the program compiled with one version of mysql won't 
 work with future ones... OUCH.

Ow, you already sorted that out...

 Now firebird is a damn big nightmare to get running, oracle is hugely 
 overpriced, most of my users despise postgres (as anybody who is NOT a DBA 
 but needs a db-backed APPS tends to) ... 

You could use Oracle XE, which is free for single-processor use. (and
some more limitations)

But why is firebird so difficult to get running? Maybe because it's not
included in most distributions?

And I don't see the problem with postgres. But I think that I can
consider myself a DBA, so l)

 Is there anything left ? 
 Especially when network transparency is SO critical ?

DB2? ;)

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Database programming

2006-09-08 Thread Joost van der Sluis
On Fri, 2006-09-08 at 08:01 +0200, Burkhard Carstens wrote:
 Am Freitag, 8. September 2006 01:18 schrieb Adrian Maier:
  On 9/7/06, Tony Maro [EMAIL PROTECTED] wrote:
   On that note I'd LOVE to see a series of Lazarus frameworks for
   implementing an Ajax application...  That stuff is hard to code!
 
  An interesting dream indeed:  to choose an 'ajax'  library instead of
  gtk/qt/etc ,
  then rebuild the lazarus application  and obtain some kind of cgi
  that would be the web version of the application.
 
 Let me know, when the first beta is available! I'd test it immediately!

I have something like that. But I hadn't enough time to maintain it.
Maybe I should look it up once more, and publish it.

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [FPC 0007205]: Parameterized SQL queries to PostgreSQL backend return incorrect date[time] values

2006-08-26 Thread Joost van der Sluis
  Resolution   open = fixed
 2006-08-25 23:07 Joost  Status   resolved = 
 assigned
 2006-08-25 23:07 Joost  Status   assigned = 
 resolved
 2006-08-25 23:07 Joost  Fixed in Version 2.0.4-rc3 = 2.1.1
 2006-08-25 23:08 Joost  Relationship added   has duplicate 
 0007258
 ==
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Access question

2006-08-22 Thread Joost van der Sluis
 just wondering, can I access a MS Access database from Lazarus in order 
 to extract some information ? I'm not exactly sure how to do it, I am 
 able to access the database via Java, but I was hoping to do the 
 exercise in Lazarus (FPC console mode even if it has to).

Use SQLDB with the ODBC Connection

Joost

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


  1   2   3   >