Re: [lazarus] Image from SQL

2007-05-16 Thread Graeme Geldenhuys
What DBMS where you using? Firebird has no such issue. I store loads of PNG and JPG images in binary Blob fields. Backup and Restore works perfectly. Graeme. On 5/15/07, ik [EMAIL PROTECTED] wrote: Many of the database backup and restore tools backup the data as sql dump. The binary image

Re: [lazarus] Image from SQL

2007-05-16 Thread Graeme Geldenhuys
On 5/15/07, Joost van der Sluis [EMAIL PROTECTED] wrote: So no need for any string-conversions. Just use: I agree! TImage.LoadFromStream(Dataset.CreateBlobStream(Field,bmread)); I use the FBLib components for a Firebird database in do the same thing. -- Graeme Geldenhuys General

Re[2]: [lazarus] Installing of new package

2007-05-16 Thread Roland Turcan
15.5.2007 18:38 - Giuliano Colla [EMAIL PROTECTED] GC Roland Turcan ha scritto: Hello [EMAIL PROTECTED] I have created a package, which contains my components. Process of compilation reports, that it is successfully completed, but during installation compiler reports, that in /ide/main.pp

Re: [lazarus] Image from SQL

2007-05-16 Thread ik
On 5/16/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote: What DBMS where you using? Firebird has no such issue. I store loads of PNG and JPG images in binary Blob fields. Backup and Restore works perfectly. I used Interbase 6.1. The problem was that gbak created a corrupted backup file, that we

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Michael Van Canneyt
On Tue, 15 May 2007, Andrew Haines wrote: Michael Van Canneyt wrote: The generated RTF is linear, i.e. it is suitable for printing. In order to create a .hlp file or a .chm file, some changes will be necessary. (.hlp requires insertion of well-formed footnotes) As far as I know

Re: [lazarus] Image from SQL

2007-05-16 Thread Michael Van Canneyt
On Wed, 16 May 2007, ik wrote: On 5/16/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote: What DBMS where you using? Firebird has no such issue. I store loads of PNG and JPG images in binary Blob fields. Backup and Restore works perfectly. I used Interbase 6.1. The problem was that gbak

Re: [lazarus] Image from SQL

2007-05-16 Thread Graeme Geldenhuys
On 5/16/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: At my current work I'm working with MySQL clusters that the only way to backup the data is by having sql dump. Unfortunately MySQL also generates wrong sql dumps at times. I learned that very quickly with the above rule... Maybe you

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Graeme Geldenhuys
On 5/16/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: PS I've been working on converting a c lzx compressor to pascal. when this is done, many of the pieces needed to make a chm file will be available. That would be good, if we can write CHM directly. I'm busy studying the CHM format,

Re: [lazarus] Image from SQL

2007-05-16 Thread Micha Nelissen
Graeme Geldenhuys wrote: Maybe you guys should switch to a *real* DBMS like Firebird. ;-) [...he ducks and runs for cover...] Or TDbf. Backing up is *sooo* straightforward. Binary data in dBase IV and up is also very straightforward in memos. ;-) (Although lately the memo code seems to be

Re: [lazarus] Image from SQL

2007-05-16 Thread Michael Van Canneyt
On Wed, 16 May 2007, Graeme Geldenhuys wrote: On 5/16/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: At my current work I'm working with MySQL clusters that the only way to backup the data is by having sql dump. Unfortunately MySQL also generates wrong sql dumps at times. I

Re: [lazarus] Image from SQL

2007-05-16 Thread ik
On 5/16/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Wed, 16 May 2007, ik wrote: On 5/16/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote: What DBMS where you using? Firebird has no such issue. I store loads of PNG and JPG images in binary Blob fields. Backup and Restore works

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Sergei Gorelkin
Wednesday, May 16, 2007, 11:22:16 AM, Michael wrote: As far as I know chm files are html not rtf. MVC Yes, but they must/can be generated by the microsoft help compiler from MVC the same RTF source. .hlp is also a compiled format, with RTF as the source. It isn't exactly this way. The chm

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Graeme Geldenhuys
On 5/16/07, Sergei Gorelkin [EMAIL PROTECTED] wrote: Since fpDoc is able to produce nice html output, it can be used directly as chm source - without touching RTF at all. I thought the same thing... All that then remains is creating the Index and TOC files etc plus archiving it to a .chm file.

[lazarus] Transferring file with SFTP from a Lazarus application

2007-05-16 Thread Adrian Maier
Hello, Does anyone happen to know whether a (free)pascal unit for SFTP or SCP file transfer exists ? I am working on a (win32) application that has to get some data files from a server and then upload back another file. Cheers, Adrian Maier

Re: Object Inspector crash, and other interesting stuff

2007-05-16 Thread Luiz Americo Pereira Camara
Mattias Gaertner wrote: I have tested this more thoroughly now. I have just had a complete crash of IDE after bringing up the colors list in the OI and scrolling from the last in the list (upon opening) to the first. The screen froze momentarily and then the IDE closed. Hmm. This works

Re: [lazarus] Transferring file with SFTP from a Lazarus application

2007-05-16 Thread Vincent Snijders
Adrian Maier schreef: Hello, Does anyone happen to know whether a (free)pascal unit for SFTP or SCP file transfer exists ? I am working on a (win32) application that has to get some data files from a server and then upload back another file. I don't know about such components. I would use

Re: Object Inspector crash, and other interesting stuff

2007-05-16 Thread Luiz Americo Pereira Camara
Luiz Americo Pereira Camara wrote: Mattias Gaertner wrote: I have tested this more thoroughly now. I have just had a complete crash of IDE after bringing up the colors list in the OI and scrolling from the last in the list (upon opening) to the first. The screen froze momentarily and then the

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Michael Van Canneyt
On Wed, 16 May 2007, Sergei Gorelkin wrote: Wednesday, May 16, 2007, 11:22:16 AM, Michael wrote: As far as I know chm files are html not rtf. MVC Yes, but they must/can be generated by the microsoft help compiler from MVC the same RTF source. .hlp is also a compiled format, with RTF

Re: [lazarus] Transferring file with SFTP from a Lazarus application

2007-05-16 Thread Michael Van Canneyt
On Wed, 16 May 2007, Adrian Maier wrote: Hello, Does anyone happen to know whether a (free)pascal unit for SFTP or SCP file transfer exists ? I am working on a (win32) application that has to get some data files from a server and then upload back another file. None exists that I know

Re: [lazarus] Transferring file with SFTP from a Lazarus application

2007-05-16 Thread Adrian Maier
On 5/16/07, Vincent Snijders [EMAIL PROTECTED] wrote: Adrian Maier schreef: Hello, Does anyone happen to know whether a (free)pascal unit for SFTP or SCP file transfer exists ? I am working on a (win32) application that has to get some data files from a server and then upload back another

RE: [lazarus] Image from SQL

2007-05-16 Thread Sergio Samayoa
Oh, after I finished copy the backup the HD crashed, So you can see Bottom line: Your own experience with that event and the problems you have particularly with MySQL is why you use such approach. That's ok IF HE/SHE use such database (MySQL) and has the same scenario, otherwise use the hammer

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Vincent Snijders
Michael Van Canneyt schreef: Yes, that would be the better way, of course. Hopefully .CHM understands style files, then... Last summer, when Andrew created the helpviewer with lazarus, I created a chm file with rtl-fcl-lcl docs. I just put it on

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Sergei Gorelkin
Wednesday, May 16, 2007, 3:12:36 PM, Michael wrote: Since fpDoc is able to produce nice html output, it can be used directly as chm source - without touching RTF at all. MVC Yes, that would be the better way, of course. Hopefully .CHM understands MVC style files, then... CHM is just an

[lazarus] Ubuntu and UIB

2007-05-16 Thread Andrea Mauri
I installed fpc and lazarus on Ubuntu. fpc using apt lazarus, last svn In my project I use UIB to access to a firebird DB. I used UIB (2.1) both on windows and linux (FC6). And it works fine. On Ubuntu I installed without any problem UIB but if I put a JvUIBDataset on a form and try to compile

Re: [lazarus] RTF backend for FPDoc.

2007-05-16 Thread Graeme Geldenhuys
On 5/16/07, Vincent Snijders [EMAIL PROTECTED] wrote: The windows chmview shows the pages correctly with stylesheets, but IIRC, the lhelpviewer using the turbopower ipro htmlpanel, doesn't show the stylesheet correctly. Yeah, its the viewer used when view the HTML that needs to understand

[lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to

2007-05-16 Thread fedorax
Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ? Lazarus svn 11153 FPC svn 7358 OS: linux fedora core 6

Re: [lazarus] Ubuntu and UIB

2007-05-16 Thread Andrea Mauri
Where I have to try to add those? I added in the project source: program Project1; {$mode objfpc}{$H+} * {$linklib c} {$linklib pthread} * uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset Forms { add your units here },

Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to

2007-05-16 Thread Burkhard Carstens
Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ?

Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to

2007-05-16 Thread Jesus Reyes
--- fedorax [EMAIL PROTECTED] escribió: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something change or is it a bug ?

Re: [lazarus] Ubuntu and UIB

2007-05-16 Thread Vincent Snijders
Does the UIB package define UseCthreads in its usage options? This was missing in the past. Vincent _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at

[lazarus] x86_64 vs. i586: longint and int64 probs

2007-05-16 Thread Tom Walsh
I'm running into an inconsistency with compiling the same program on two machines: one is AMD64 X2 (x86_64) and the the other is an i586 box. The problem is with fptime() where it expects a longint on the i586 box and the x86_64 compiler wants an int64 passed as the parameter. How can I

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
Hi again all Based on everyone's advice, I chose to go with base64 encoding - and started coding. Right now I am quite successfully: 1) Reading the image 2) Encoding it to base64 (using the encodeb64 function from the examples) 3) Storing the result in the database (I THINK it's storing right)

Re: [lazarus] Installing of new package

2007-05-16 Thread Giuliano Colla
Roland Turcan ha scritto: [snip] I am looking for something similar to Delphi (Env.options/Library/Library path) which is common for IDE and compiler. You'll find that in: Project/Compiler Options/Paths - the only difference being that you'll have to specify both compiler paths and IDE

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
A small update - Don't ask me WHY - but get this - I take the exact same unchanged code, and insert an XPM image. It works perfectly. I try a jpg or a png - and it fails. All I can imagine is that my b64decode function is broken - and that the breakage is ONLY affecting true binary sources, XPM

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
So - second attempt at implementing it... same sad result - only now the XPM fails as well... This is my now somewhat improved code... am I missing something extremely obvious here ? Function DecodeB64(S : String) : String; Procedure doNothing; Begin end; var b64decoder: TBase64DecodingStream;

Re: [lazarus] Image from SQL

2007-05-16 Thread ik
Hi, Why not to use the FPC's unit of BASE64 ? it works on streams. Or am I missing something ? Ido On 5/16/07, A.J. Venter [EMAIL PROTECTED] wrote: So - second attempt at implementing it... same sad result - only now the XPM fails as well... This is my now somewhat improved code... am I

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
I am using it- only I am not apparently using it RIGHT :S My b64decode function is using BASE64's stream class to operate with -it's purpose isn't to do the decoding (BASE64 is meant to do that), but rather the conversion process from string to stream -into base64 - back into string. Since the

RE: [lazarus] Image from SQL

2007-05-16 Thread Sergio Samayoa
Dont known about base64 but you should protect resources with try..finally blocks: S1 := TStringStream.Create(S); try S2 := TStringStream.Create(S); try ...Use resources... finally S2.Free; end; finally S1.Free; end; Also, why DoNothing procedure, just left except block empty:

Re: [lazarus] Image from SQL

2007-05-16 Thread Bram Kuijvenhoven
Hi A.J., If you create a standalone demo program that: - reads in an image file - calls your Base64Encode function - next calls your Base64Decode function (i.e. leave out the DB stuff) - writes the result to an output file (which is damaged) and attach the image file, then I will take a look at

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
I am using version 2.0.4 at this point - should I upgrade ? I did a program as you suggested. It did confirm that it's NOT the database which is at fault. And my testdata is attached, yah.png is the source image I tested with, blah.tmp is the one that was generated (and doesn't open). The

Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to

2007-05-16 Thread fedorax
Selon Jesus Reyes [EMAIL PROTECTED]: --- fedorax [EMAIL PROTECTED] escribió: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to

Re: [lazarus] Image from SQL

2007-05-16 Thread Bram Kuijvenhoven
A.J. Venter wrote: Var S1,S2,S3: TStringList; FN : String; begin S1 := TStringList.Create; S2 := TStringList.Create; S3 := TStringList.Create; If OpenPictureDialog1.Execute then Begin S1.LoadFromFile(OpenPictureDialog1.FileName); S2.Add(EncodeB64(S1.Text));

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
Just some more on this - I have no upgraded to the 2.3.1 snapshot, The test program still fails - but I did another test, and indeed, xpm format works, - png does not, comparing a head -n 5 on the source and the decoded files show clear differences - though I am not sure what the pattern would

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
Hiya Bram Well I decided to follow your advice. I changed my structure to encode straight from file (using a tfilestream) and also to decode directly TO a file (completely removing the stringlists). But now my files just remain empty - despite me being very carefull to free the tfilestream...

Re: [lazarus] Image from SQL

2007-05-16 Thread A.J. Venter
Okay guys, It's working. Thanks SO much to everyone who helped me get it going - the final one (it turns out) had nothing to do with the base64 code - while I was restructuring for the idea of saveing as I decode I had to change GetData function - and I forgot to return the result -the files

Re: [lazarus] x86_64 vs. i586: longint and int64 probs

2007-05-16 Thread Tom Walsh
Tom Walsh wrote: I'm running into an inconsistency with compiling the same program on two machines: one is AMD64 X2 (x86_64) and the the other is an i586 box. The problem is with fptime() where it expects a longint on the i586 box and the x86_64 compiler wants an int64 passed as the

Re: [lazarus] Big Problems with TPageControl in GTK

2007-05-16 Thread Christian Ulrich
Hi, I have managed to get a bit more Information about this issue. I have DBGrids on some Tabs on all Forms. I set the Datasources of this Grids at Runtime. !!! If i dont Set the DataSources of this Grids the Tabs stay Visible. On the Tabs are also other db controls but it makes

Re: [lazarus] Printer.Canvas.TextStyle.Alignment=taRightJustify = Argument can't be assigned to

2007-05-16 Thread Luiz Americo Pereira Camara
Burkhard Carstens wrote: Am Mittwoch, 16. Mai 2007 16:35 schrieb fedorax: Hello, I just make a new svn update and i've a little problem: using: Printer.Canvas.TextStyle.Alignment=taRightJustify; return this error: cheques.pas(210,35) Error: Argument can't be assigned to Did something