Re: RE : RE : RE : [fpc-pascal] XML-XSD export: importer how to test

2011-07-29 Thread Reinier Olislagers
On 29-7-2011 9:27, michael.vancann...@wisa.be wrote: On Thu, 28 Jul 2011, Ludo Brands wrote: Agreed, but you cannot every kind of data type, for that you will probably need the various databases... and hopefully a continuous integration server to run the tests... Sqldb converts

[fpc-pascal] Memds deprecated?

2011-07-29 Thread Reinier Olislagers
Hi list, According to Joost van der Sluis - 2010-07-22 12:14 in http://bugs.freepascal.org/view.php?id=13967 TMemDataset is deprecated and TBufDataset should be used instead. If this is true, could TMemDataset be marked as deprecated in the code and documentation? Reinier

Re: [fpc-pascal] Memds deprecated?

2011-07-29 Thread Reinier Olislagers
On 29-7-2011 11:10, michael.vancann...@wisa.be wrote: On Fri, 29 Jul 2011, Reinier Olislagers wrote: Hi list, According to Joost van der Sluis - 2010-07-22 12:14 in http://bugs.freepascal.org/view.php?id=13967 TMemDataset is deprecated and TBufDataset should be used instead

[fpc-pascal] Proper way to assign data to fields documentation

2011-08-01 Thread Reinier Olislagers
(Reposted from the forum; I think I might actually get a response here ;) While writing a test program with TBufDataset, I'm trying to create a dataset with as many field types as possible. The following code compiles: FTestDataset.Fieldbyname('ftBCD').Asfloat := Testextended;

[fpc-pascal] Unicode output on console works for me on Linux, not on Windows

2011-08-01 Thread Reinier Olislagers
(Reposted from the forum) I tried to output Unicode text to console on English Windows Vista (using Lucida Console font, which shows Greek and Cyrillic characters). Doesn't seem to work. (On Debian x64 it works perfectly - maybe because the default encoding I've got is UTF8: LANG environment

[fpc-pascal] Trouble setting/getting ftVarBytes field data in TBufDataset

2011-08-01 Thread Reinier Olislagers
I've got trouble finding out how to fill and retrieve data for a ftVarBytes field in a TBufDataset. .AsString doesn't seem to work well - if I fill it with the string How do I fill this field? I get back How I tried SetData, which takes a buffer as data, so I tried filling a PChar with the

Re: [fpc-pascal] Unicode output on console works for me on Linux, not on Windows

2011-08-02 Thread Reinier Olislagers
On 1-8-2011 14:38, Ondrej wrote: I think that you have to configure the console to use UTF-8 output (but I don't know how this is done on Windows). I think that should be: SetConsoleOutputCP(CP_UTF8); Thanks all, I got it to work using SetConsoleOutput. UTF8ToConsole did not work for me.

[fpc-pascal] Bump: Trouble setting/getting ftVarBytes field data in TBufDataset

2011-08-02 Thread Reinier Olislagers
On 2-8-2011 7:39, Reinier Olislagers wrote: I've got trouble finding out how to fill and retrieve data for a ftVarBytes field in a TBufDataset. .AsString doesn't seem to work well - if I fill it with the string How do I fill this field? I get back How I tried SetData, which takes

[fpc-pascal] Is there a way to create a Firebird embedded database programmatically?

2011-08-02 Thread Reinier Olislagers
When using the Firebird embedded database, it's nice to be able to create the database using only FreePascal/Lazarus. Is there a way to do this, e.g. using the SQLScript component, using something like this: const DatabaseFile = 'DATABASE1.FDB'; var CreateScript: TSQLScript; ScriptText:

Re: [fpc-pascal] Is there a way to create a Firebird embedded database programmatically?

2011-08-03 Thread Reinier Olislagers
On 3-8-2011 9:48, Tony Whyman wrote: Reiner, You can certainly do this with IBX for Lazarus (http://www.mwasoftware.co.uk). You will also find there some guidelines on using the Firebird embedded library under both Windows and Linux that are more general than just IBX. If you want to

Re: [fpc-pascal] Is there a way to create a Firebird embedded database programmatically?

2011-08-03 Thread Reinier Olislagers
On 3-8-2011 11:50, Michael Van Canneyt wrote: On Wed, 3 Aug 2011, Reinier Olislagers wrote: When using the Firebird embedded database, it's nice to be able to create the database using only FreePascal/Lazarus. Why do you think this is not possible ? The CreateDB method

Re: [fpc-pascal] Is there a way to create a Firebird embedded database programmatically?

2011-08-03 Thread Reinier Olislagers
On 3-8-2011 12:05, Tony Whyman wrote: Actually, my preference for creating a database in a deployed application is to first create it on my local system using isql with input from a script and then to save it using gbak in a portable format. The TIBRestoreService is then used to create the

Re: [fpc-pascal] Is there a way to create a Firebird embedded database programmatically?

2011-08-03 Thread Reinier Olislagers
On 3-8-2011 12:38, Tony Whyman wrote: I understand now what you are doing and would agree that for a simple demo, you really do want to create the DB in code. I am thinking more about distributing and supporting a fully supported application. Interesting that I seemed to get so much

Re: RE : [fpc-pascal] Bump: Trouble setting/getting ftVarBytes field data inTBufDataset

2011-08-03 Thread Reinier Olislagers
On 3-8-2011 12:32, Ludo Brands wrote: On 2-8-2011 7:39, Reinier Olislagers wrote: I've got trouble finding out how to fill and retrieve data for a ftVarBytes field in a TBufDataset. TestDataset.FieldByName('ftVarBytes').Asstring := Teststring; writeln('ftVarbytes.AsString

[fpc-pascal] FreeVision usable in a client/server database application?

2011-08-03 Thread Reinier Olislagers
Hi list, I'm looking into converting a half-finished small timekeeping/billing application of mine from .Net to Lazarus/Freepascal. It runs on SQL Server 2008. I'm thinking about trying to separate out the database layer (using something like tiOPF perhaps) from the presentation layer. I could

Re: [fpc-pascal] FreeVision usable in a client/server database application?

2011-08-04 Thread Reinier Olislagers
On 4-8-2011 10:02, Felipe Monteiro de Carvalho wrote: Lazarus is very easy to learn, you can read the wiki and now there is also a book in english explaining how to use it. Thanks Felipe Michael! Yes, I'm already doing stuff in Lazarus (even got the book). I'd be looking at the FreeVision

Re: [fpc-pascal] FreeVision usable in a client/server database application?

2011-08-04 Thread Reinier Olislagers
On 4-8-2011 10:50, Graeme Geldenhuys wrote: On 3 August 2011 15:53, Reinier Olislagers wrote: While I'm doing that, I thought about using character mode terminals (DOS or Linux shell) for quick data entry. As Michael said, it could definitely work. But is there any specific reason why you

Re: [fpc-pascal] FreeVision usable in a client/server database application?

2011-08-04 Thread Reinier Olislagers
On 4-8-2011 11:34, Graeme Geldenhuys wrote: On 4 August 2011 11:14, Reinier Olislagers wrote: My apologies; from your original message I didn't know step 2 was compulsory. I thought in step 2 you are considering FreeVision or some GUI desktop app. No problem ;) Just curious as to why you

[fpc-pascal] [Semi-OT] How to get remote Git revision number (or last update date) using FPC+git executable

2011-08-04 Thread Reinier Olislagers
Hi all, I'm working on expanding the LazUpdater tool, so it can download and compile an entire working installation of FPCLazarus from scratch on Windows. (It downloads binutils, if necessary svn executables etc). My updates so far on: http://forge.lazarusforum.de/issues/118 Why? Because I'm fed

[fpc-pascal] Re: [Semi-OT] How to get remote Git revision number (or last update date) using FPC+git executable

2011-08-04 Thread Reinier Olislagers
On 4-8-2011 13:39, Graeme wrote: On 4 August 2011 12:58, Reinier Olislagers wrote: 1. The program checks for the current git revision number (a hex string in fact) of the local copy. I believe you are referring to the SHA1 value. I think you believe correctly ;) How do I find out, using

[fpc-pascal] Extended LazUpdater available: cross-platform install of SVN/Git FPC/Lazarus

2011-08-05 Thread Reinier Olislagers
Hi all, I've extended LazUpdater. This program allows you to download and compile a subversion or git version of FreePascal and Lazarus in an easy way, without fiddling with batch files. On Windows: it's meant to be able to do this without existing FPC compiler, binutils (make.exe etc), svn

Re: RE : RE : [fpc-pascal] Patch: new XML export for FCL-DB ready forinclusion, issue 19790 - includes Delphi Clientdataset

2011-08-05 Thread Reinier Olislagers
On 28-7-2011 14:36, Ludo Brands wrote: - bcd: invalid field type Ok, what field type do we need ;) I'll wait for your further investigations. Line 2087 becomes: ftBCD: //WIDTH=precision, DECIMALS=scale snip The sqldb mysql implementation doesn't distinguish text from blob. Nothing

Re: RE : RE : RE : [fpc-pascal] Patch: new XML export for FCL-DB readyforinclusion, issue 19790 - includes Delphi Clientdataset

2011-08-06 Thread Reinier Olislagers
On 6-8-2011 19:28, Ludo Brands wrote: After my recent adventures with LazUpdater, back to the XML export. I've written new tests with more data types that at least produce test output now. Problems so far: TClientDataSet: - ftWideString has zero length by default: Delphi 6 returns

[fpc-pascal] Assigning value to ftVariant datatype varbytes - still stuck

2011-08-07 Thread Reinier Olislagers
Hi list, Free Pascal Compiler version 2.5.1 [2011/08/04] for i386 While improving my fcl-db XML export code, I'm testing with ftVariant types in a bufdataset: FieldDef := FTestDataset.FieldDefs.AddFieldDef; FieldDef.Name := 'ftVariant'; FieldDef.DataType := ftVariant; This works:

Re: RE : [fpc-pascal] Assigning value to ftVariant datatype varbytes -still stuck

2011-08-07 Thread Reinier Olislagers
On 7-8-2011 18:28, Ludo Brands wrote: FTestDataSet.FieldByName('ftVarBytes').AsString:=TestString; FTestDataSet.FieldByName('ftVariant').AsString:=TestString; Same problem as before: TBufDataset doesn't support correctly ftVarBytes and ftVariant and doesn't raise an

Re: RE : RE : [fpc-pascal] Assigning value to ftVariant datatype varbytes-still stuck

2011-08-07 Thread Reinier Olislagers
On 7-8-2011 19:50, Ludo Brands wrote: Same problem as before: TBufDataset doesn't support correctly ftVarBytes and ftVariant and doesn't raise an SErrFieldTypeNotSupported like TMemDataset is doing. Look at TCustomBufDataset.GetFieldSize and you'll see that data length for ftVarBytes and

Re: RE : RE : [fpc-pascal] Assigning value to ftVariant datatype varbytes-still stuck

2011-08-08 Thread Reinier Olislagers
On 7-8-2011 19:50, Ludo Brands wrote: TBufDataset doesn't support ftVarBytes and ftVariant. Variants are complex objects and aren't stored by just copying bytes. Don't use them with TBufDataset. Ludo ... cause they have some kind of structure that describes what kind of data the

[fpc-pascal] Re: Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How? [SOLVED]

2011-08-08 Thread Reinier Olislagers
On 6-8-2011 15:28, Causal Lists wrote: I finally managed to get Intel Mac OS X cross-compilation (from Linux) working well so I thought I'd document what I did for the benefit of others because the info in the wiki is wildly out of date. I'll update the wiki (if I can) to point to this

Re: [fpc-pascal] Re: Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How? [SOLVED]

2011-08-09 Thread Reinier Olislagers
wrote: Brilliant, thanks Reinier, it looks good. Cheers, Bruce. On 08/08/11 23:03, Reinier Olislagers wrote: http://wiki.lazarus.freepascal.org/Cross_compiling_OSX_on_Linux ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

[fpc-pascal] Suggested fix for problem make install trunk FPC: trailing backslash in directory specification

2011-08-09 Thread Reinier Olislagers
Just tried updating FPC sources and compiling (32 bit) on Windows Vista x64 and got an error and a solution. === Summary: I get an error when I do something like: make.exe install INSTALL_PREFIX=C:\Development\Fpc\

[fpc-pascal] Re: RE : RE : RE : Assigning value to ftVariant datatype varbytes-still stuck

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 12:17, Ludo Brands wrote: I created a patch for ftVariant, ftBytes and ftVarBytes support as well as a check for supported types and attached it to the issue. Feel free to extend your tests with it ;) Thanks, I'll have a look. Also a change in fpXMLXSDExport line 388:

[fpc-pascal] Re: Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How? [SOLVED]

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 12:21, Torsten Bonde Christiansen wrote: On 2011-08-09 10:46, Reinier Olislagers wrote: My pleasure - though I haven't finished yet may run into things. It seems you're setting up a 32 bit environment. Both my Linux (Debian) and OSX machine are 64 bit - don't know

[fpc-pascal] Re: RE : Re: RE : RE : RE : Assigning value to ftVariant datatype varbytes-still stuck

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 13:34, Ludo Brands wrote: I've changed ftVariant to base64 encoding (i.e. treat is as binary) in commit 19: Mmm... That's taking risks and requires quite some testing with the different host applications. When transferring data as strings, we know that apps do the string to

[fpc-pascal] Re: RE : RE : RE : Assigning value to ftVariant datatype varbytes-still stuck

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 12:17, Ludo Brands wrote: I created a patch for ftVariant, ftBytes and ftVarBytes support as well as a check for supported types and attached it to the issue. Feel free to extend your tests with it ;) Applied patch in fpc source, make clean, make all make install for FPC, make for

[fpc-pascal] Re: Cross Compiling from Linux to a Mac OS X 10.5 or 10.6 target. How? [SOLVED]

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 14:29, Torsten Bonde Christiansen wrote: On 2011-08-09 12:59, Reinier Olislagers wrote: On 9-8-2011 12:21, Torsten Bonde Christiansen wrote: On 2011-08-09 10:46, Reinier Olislagers wrote: I've put this on the wiki, don't know if it helps On 64 bit Linux environments, fpc mailing

Re: RE : [fpc-pascal] Re: RE : RE : RE : Assigning value to ftVariant datatype varbytes-still stuck

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 16:42, Ludo Brands wrote: Downloaded the code and it raises an SUnsupportedFieldType when creating the ftAutoInc field. That is OK since I didn't include ftAutoinc in the supported list for TBufDataset. If you are not getting this error, then the patch and/or install didn't work.

[fpc-pascal] Re: RE : Re: RE : RE : RE : Assigning value to ftVariant datatype varbytes-still stuck

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 17:03, waldo kitty wrote: On 8/9/2011 10:42, Ludo Brands wrote: Exception: Access violation Source unit: Method name: Line number: 574 00.003 TestXSDExport_Access_NoXSD_NoDecimal Error: Line 547 is where FillTestData is called. Not very

[fpc-pascal] Re: RE : Re: RE : RE : RE : Assigning value to ftVariant datatype varbytes-still stuck

2011-08-09 Thread Reinier Olislagers
On 9-8-2011 16:42, Ludo Brands wrote: Applied patch in fpc source, make clean, make all make install for FPC, make for Lazarus, rescan fpc source directory, recompile test project. snip Downloaded the code and it raises an SUnsupportedFieldType when creating the ftAutoInc field. That is

Re: RE : [fpc-pascal] Re: RE : Re: RE : RE : RE : Assigning value to ftVariant datatype varbytes-still stuck

2011-08-10 Thread Reinier Olislagers
On 10-8-2011 9:49, Ludo Brands wrote: Oops, sorry, you're right. Your cygwin diffs don't seem to agree with (the way I use) fpc patch; I got it to apply only the first part of the patch... Now it works. The patches I upload to bugs.freepascal are made with svn diff. The ones I sent you

Re: RE : RE : [fpc-pascal] Re: RE : RE : RE : Assigning value to ftVariantdatatype varbytes-still stuck

2011-08-10 Thread Reinier Olislagers
On 10-8-2011 11:51, Ludo Brands wrote: I do get a segfault in the last test when assigning to ftWideString256. When tracing the code it crashes when moving the size+1 chracters to the database. This fixed length moving is fundamentally wrong. The string is only 20 or so chars long and

[fpc-pascal] XMLXSDExport: line ending in Excel cells

2011-08-12 Thread Reinier Olislagers
Hi list, I've been refactoring the XMLXSDExport code and am now busy fixing some bugs based on testing. I'd appreciate your input. In Excel text fields, you can generate a line ending by pressing Alt-Enter. On export to XML this is written as #10; So far so good. If exporting dataset text

[fpc-pascal] Re: XMLXSDExport: line ending in Excel cells

2011-08-12 Thread Reinier Olislagers
On 12-8-2011 12:32, Reinier Olislagers wrote: In Excel text fields, you can generate a line ending by pressing Alt-Enter. On export to XML this is written as #10; So far so good. If exporting dataset text (memo, string, ..) data to Excel XML text fields, which characters do I need

[fpc-pascal] Explicit encoding of LF in XML

2011-08-12 Thread Reinier Olislagers
All, Looking at multiline support of text/string cells for export to Excel XML format. My code, such as: TDOMElement(FieldNode).SetAttribute('ss:Type', 'String'); FNode := Foutputdoc.CreateTextNode(LeftStr(UTF8Decode(EF.Field.AsString), 32767)); writes out a cell like: CellData

Re: RE : [fpc-pascal] Explicit encoding of LF in XML

2011-08-12 Thread Reinier Olislagers
On 12-8-2011 16:31, Ludo Brands wrote: Excel needs an encoded LF: CellData ss:Type=StringFirst line.#10;Second line/Data/Cell How can I produce that? Uses strutils; ... Foutputdoc.CreateTextNode(LeftStr(UTF8Decode(AnsiReplaceStr(AnsiReplaceStr(E

[fpc-pascal] ftGuid displaytext output

2011-08-13 Thread Reinier Olislagers
While trying to export dataset data to XML, I use this for ftGUID fields: FNode := Foutputdoc.CreateTextNode(Utf8decode(GUIDToString(TGuid(EF.Field.Value; This works on Windows 32 and shows a hex representation of the GUID, like {---C000-0046} On Linux x64, I

Re: RE : [fpc-pascal] ftGuid displaytext output

2011-08-14 Thread Reinier Olislagers
On 13-8-2011 13:04, Ludo Brands wrote: TGuidField stores guid in the string format (GuidToString). EF.Field.AsString should give you the correct string value. Ludo Thanks, Ludo. I think I was using AsString at first. I'll have a further look; maybe I'm putting in rubbish; I'll probably have

Re: RE : RE : RE : RE : [fpc-pascal] Re: RE : RE : RE : Assigningvalue toftVariantdatatype varbytes-still stuck

2011-08-14 Thread Reinier Olislagers
On 14-8-2011 16:30, Ludo Brands wrote: In our previous episode, Ludo Brands said: Sorry mate. No reaction. Everybody seems to be happy with the current implementation. Under these circumstances, I'm not going to spend any time on creating a patch that makes a, minor, change to the

Re: [fpc-pascal] Patch: new XML export for FCL-DB ready for inclusion, issue 19790 - includes Delphi Clientdataset

2011-08-15 Thread Reinier Olislagers
On 28-7-2011 9:24, michael.vancann...@wisa.be wrote: On Thu, 28 Jul 2011, Reinier Olislagers wrote: On 27-7-2011 20:52, michael.vancann...@wisa.be wrote: Code like ftWideString: //fixed length or at least max length string begin TDOMElement(ColumnNode).SetAttribute

Re: [fpc-pascal] Patch: new XML export for FCL-DB ready for inclusion, issue 19790 - includes Delphi Clientdataset

2011-08-15 Thread Reinier Olislagers
On 15-8-2011 11:25, Michael Van Canneyt wrote: I created a dataset with 2 fields. A ftString field with size 33, and a ftWideString field with size 44. Based on the following output from SaveToFile, I would say that you'll need to put Size*SizeOf(CharTypeUsedInfield), which should be

Re: [fpc-pascal] Patch: new XML export for FCL-DB ready for inclusion, issue 19790 - includes Delphi Clientdataset

2011-08-15 Thread Reinier Olislagers
On 15-8-2011 11:44, Reinier Olislagers wrote: On 15-8-2011 11:25, Michael Van Canneyt wrote: I created a dataset with 2 fields. A ftString field with size 33, and a ftWideString field with size 44. Based on the following output from SaveToFile, I would say that you'll need to put Size*SizeOf

Re: [fpc-pascal] Patch: new XML export for FCL-DB ready for inclusion, issue 19790 - includes Delphi Clientdataset

2011-08-15 Thread Reinier Olislagers
On 15-8-2011 12:33, michael.vancann...@wisa.be wrote: I applied the patch, thank you very much for this work :-). But please: - Try to split patches in smaller chunks. It's better for bugfixing. If you break something it's harder to track what caused the break with these huge patches.

[fpc-pascal] Funambol/syncml and fpc

2011-08-30 Thread Reinier Olislagers
Hi all, Has anyone used funambol/syncml libraries or an FPC equivalent to talk the syncml protocol? I've got a Firebird address database that I would like to sync some day using Funambol (with Thunderbird, or sogo/OpenChange in future). (Also, another very wild idea is trying to write a

[fpc-pascal] DBF Field name length and fpdbfexport

2011-09-02 Thread Reinier Olislagers
Hi all, If I Googled correctly, the following field size limits are present for the various DBase formats: 3: DBase III: 10 characters 4: DBase IV: 10 characters 7: DBase VII: 32 characters 8: FoxPro: 10 characters 3,4: http://www.clicketyclick.dk/databases/xbase/format/dbf.html#DBF_STRUCT 7:

Re: [fpc-pascal] DBF Field name length and fpdbfexport

2011-09-02 Thread Reinier Olislagers
On 2-9-2011 13:23, michael.vancann...@wisa.be wrote: On Fri, 2 Sep 2011, Reinier Olislagers wrote: Hi all, snip long-winded post Presumably, yes. Michael. ;) Thanks, I'll give it a go and attach a patch to Mantis... Reinier ___ fpc-pascal

Re: [fpc-pascal] DBF Field name length and fpdbfexport

2011-09-02 Thread Reinier Olislagers
On 2-9-2011 13:23, michael.vancann...@wisa.be wrote: On Fri, 2 Sep 2011, Reinier Olislagers wrote: snip In packages\fcl-db\src\export\fpdbfexport.pp These tablelevels/formats are defined: TTableFormat = (tfDBaseIII,tfDBaseIV,tfDBaseVII,tfFoxPro); In function function

Re: [fpc-pascal] DBF Field name length and fpdbfexport

2011-09-02 Thread Reinier Olislagers
On 2-9-2011 15:09, michael.vancann...@wisa.be wrote: On Fri, 2 Sep 2011, Reinier Olislagers wrote: On 2-9-2011 13:23, michael.vancann...@wisa.be wrote: On Fri, 2 Sep 2011, Reinier Olislagers wrote: I think I've also found the solution to http://bugs.freepascal.org/view.php?id=20069 (patch

[fpc-pascal] Improved LazUpdater - testers welcome on Windows

2011-09-03 Thread Reinier Olislagers
Hello FPC and Lazarus lists, I've been improving the LazUpdater FPC/Lazarus SVN downloader/installer written by Ingo Steiniger for a while now. I didn't get any reaction from the original author http://forge.lazarusforum.de/issues/118 so I uploaded my version to a mercurial repository:

[fpc-pascal] TField.Attributeset explanation?

2011-09-05 Thread Reinier Olislagers
Hi all, Working on the SQLDB Tutorial1 on the wiki. I'm struggling with getting dbgrid-driven inserts to work. Using Firebird employee.fdb CUSTOMER table; CUST_NO is an integer primary key with Firebird generator/sequence + trigger = sort of an autonumber/autoinc field. When inserting records

[fpc-pascal] FPCDocs Git repository

2011-09-05 Thread Reinier Olislagers
Hi all, goeiemore Graeme ;), While there are git repositories for FPC and Lazarus, there doesn't seem to be one for FPCDocs. Is a public git repository available for FPCDocs? The reason: I'm looking into extending my version of LazUpdater https://bitbucket.org/reiniero/lazupdater_baremetal to

Re: [fpc-pascal] TField.Attributeset explanation?

2011-09-05 Thread Reinier Olislagers
On 5-9-2011 10:30, michael.vancann...@wisa.be wrote: On Mon, 5 Sep 2011, Reinier Olislagers wrote: When inserting records with an empty CUST_NO, I get an error that CUST_NO is required. That is normal. Just set the 'Required' property of the CUSTNO field to False. AAARGGH. A million

Re: [fpc-pascal] FPCDocs Git repository

2011-09-05 Thread Reinier Olislagers
On 5-9-2011 12:19, Graeme Geldenhuys wrote: I'm a bit busy at work at the moment, but will see if I can setup a Git mirror in a few days time. Regards, - Graeme - Baie dankie dat jy dit wil doen! Thanks a lot in advance, Reinier ___ fpc-pascal

Re: [fpc-pascal] TField.Attributeset explanation?

2011-09-05 Thread Reinier Olislagers
On 5-9-2011 11:39, michael.vancann...@wisa.be wrote: On Mon, 5 Sep 2011, Alex Shishkin wrote: 05.09.2011 12:30, michael.vancann...@wisa.be пишет: Forget the 'Attributeset' property. It's not used in FPC. (in fact, I don't even know what it's for or where it comes from) Michael.

Re: [fpc-pascal] DBF Field name length and fpdbfexport

2011-09-05 Thread Reinier Olislagers
On 2-9-2011 14:38, Reinier Olislagers wrote: I think I've also found the solution to http://bugs.freepascal.org/view.php?id=20069 (patch attached), so if somebody would be so kind to review apply them, I'd be very happy. Turns out the dbf export code needs at least another patch. DBF export

Re: [fpc-pascal] DBF Field name length and fpdbfexport

2011-09-06 Thread Reinier Olislagers
On 6-9-2011 8:32, Michael Van Canneyt wrote: On Tue, 6 Sep 2011, Reinier Olislagers wrote: Wasn't aware of your/maintainers' preferences regarding naming, so I'll keep that in mind. To be honest, just thought you guys were lazy old fashioned to use I J as loop counter variables

CSVExport: was Re: [fpc-pascal] DBF Field name length and fpdbfexport

2011-09-07 Thread Reinier Olislagers
On 6-9-2011 9:14, Reinier Olislagers wrote: On 6-9-2011 8:32, Michael Van Canneyt wrote: On Tue, 6 Sep 2011, Reinier Olislagers wrote: Also, creating a Lazarus XMLSDExport component, and possibly rewriting CSVexport to use sdfdata, so it needs less code (current code basically duplicates what

[fpc-pascal] How to detect supported data types in dataset?

2011-09-07 Thread Reinier Olislagers
Hi list, Possible newbie question so feel free to educate me ;) (Away for some days, so may not read response until back) A patch by Ludo Brands on bufdataset (mantis 19930) got me thinking: const ftSupported = [ftString,ftGuid,... and so on]; procedure TCustomBufDataset.CreateDataset; var

[fpc-pascal] Re: How to detect supported data types in dataset?

2011-09-15 Thread Reinier Olislagers
On 8-9-2011 9:16, michael.vancanneyt-0is9kj9s...@public.gmane.org wrote: On Thu, 8 Sep 2011, Reinier Olislagers wrote: Am I missing something obvious or does it make sense to expose something like a SupportedFieldTypes property for datasets? How does Delphi do this? It does not. Besides

[fpc-pascal] [Patch] New tests for fcl-db export

2011-09-16 Thread Reinier Olislagers
Hi list, FYI hopefully implementation: I've been writing some tests for fcl-db export, that test basic functionality for: - CSV export - DBF export - SimpleXML export Please find them in Mantis: 20271 [Patch] SimpleXML export: new test for fcl-db 20268 [Patch] CSV export: new test for

[fpc-pascal] How to do conditional compilation with macros

2011-09-18 Thread Reinier Olislagers
Trying to test for a certain minimum version of FPC. Have got FPC version 2.7.1 [2011/09/17] for i386 on Windows. What am I doing wrong? program conditional; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Classes; begin //How should I use

Re: [fpc-pascal] How to do conditional compilation with macros

2011-09-18 Thread Reinier Olislagers
On 18-9-2011 13:41, Sven Barth wrote: On 18.09.2011 13:29, Reinier Olislagers wrote: What am I doing wrong? Additionally to what Marco wrote: You must not use the $ as prefix for the variable if you reference such a compiler define inside an $if or $ifdef. Regards, Sven Thanks guys

[fpc-pascal] Hints on getting FPDocs to work on Linux

2011-09-18 Thread Reinier Olislagers
Hi gang, total Latex newbie here Any hints on which packages to install on Debian Squeeze (current stable) or which files are required so I can try generating some FPDocs content? Something like aptitude install texlive tex4ht python-plastex hevea dvi2tty perhaps? (Looking into writing some

Re: [fpc-pascal] Hints on getting FPDocs to work on Linux

2011-09-18 Thread Reinier Olislagers
On 18-9-2011 23:27, Graeme Geldenhuys wrote: On 18/09/2011, Reinier Olislagers wrote: I never install binary releases of the various distro packages - they are always out of date. LazUpdater ftw ;) (When I have it working on Linux) Your post did remind me to check whether git is installed

[fpc-pascal] fcl-extra ServiceManager doesn't seem to working with unelevated Windows account?

2011-10-04 Thread Reinier Olislagers
Hi list, First wanted to check with you if I'm doing something wrong. Using the ServiceManager unit (Windows only), I'm trying to find out if a service is running (Vista x64). I can do: sc query samss on the command line without problem. When I run fpc ServiceTest.pas rem Free Pascal Compiler

Re: [fpc-pascal] fcl-extra ServiceManager doesn't seem to working with unelevated Windows account?

2011-10-04 Thread Reinier Olislagers
On 4-10-2011 12:31, Sven Barth wrote: Am 04.10.2011 12:22, schrieb Reinier Olislagers: Services.Connect; Services.Acces := SC_MANAGER_CONNECT; //Note typo in property. You need to set Acces(s), before calling Connect, because the connection API OpenSCManager is called inside

[fpc-pascal] [Semi-OT] Git format patches don't seem to work

2011-10-04 Thread Reinier Olislagers
Hi all, Having some trouble creating patches that actually work. (On Windows) I've been using git to get FPC trunk and git diff --no-prefix %temp%\mypatch.diff rem --no-prefix : Do not show any source or destination prefix. to create patches. Using Msysgit: git --version git version

Re: [fpc-pascal] [Semi-OT] Git format patches don't seem to work

2011-10-04 Thread Reinier Olislagers
On 4-10-2011 13:14, Marco van de Voort wrote: In our previous episode, Reinier Olislagers said: Having some trouble creating patches that actually work. (On Windows) I've been using git to get FPC trunk and git diff --no-prefix %temp%\mypatch.diff rem --no-prefix : Do not show any source

[fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-06 Thread Reinier Olislagers
On 4-10-2011 14:41, Reinier Olislagers wrote: On 4-10-2011 13:14, Marco van de Voort wrote: In our previous episode, Reinier Olislagers said: Having some trouble creating patches that actually work. (On Windows) I've been using git to get FPC trunk and git diff --no-prefix %temp

Re: [fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-06 Thread Reinier Olislagers
On 6-10-2011 16:56, Alex Shishkin wrote: 06.10.2011 16:37, Reinier Olislagers пишет: On 4-10-2011 14:41, Reinier Olislagers wrote: On 4-10-2011 13:14, Marco van de Voort wrote: In our previous episode, Reinier Olislagers said: Having some trouble creating patches that actually work

Re: [fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-06 Thread Reinier Olislagers
On 6-10-2011 17:07, Graeme Geldenhuys wrote: On 06/10/2011, Reinier Olislagers wrote: Git: https://github.com/graemeg/freepascal/raw/7026b7669fd422f88ffe33174dac1725c0295427/packages/fcl-extra/src/win/ServiceManager.pas = Unix line endings via git pull etc = Unix line endings

Re: [fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-06 Thread Reinier Olislagers
On 6-10-2011 17:04, Alex Shishkin wrote: 06.10.2011 18:59, Reinier Olislagers пишет: Thanks Alex, I already fiddled with that. I'll try again with core.autocrlf set to true and false to make sure it doesn't work... not true not false, but input. Read this if have not yet : http://progit.org

Re: [fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-06 Thread Reinier Olislagers
On 6-10-2011 17:04, Alex Shishkin wrote: 06.10.2011 18:59, Reinier Olislagers пишет: Thanks Alex, I already fiddled with that. I'll try again with core.autocrlf set to true and false to make sure it doesn't work... not true not false, but input. Read this if have not yet : http://progit.org

Re: [fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-07 Thread Reinier Olislagers
On 7-10-2011 9:15, Graeme Geldenhuys wrote: On 06/10/2011 20:41, Reinier Olislagers wrote: The Git installation under Windows set mine to true (not input). true it is, see other message ;) So while it could be used, I'd have to remember to run unix2dos over it - that is, if people expect

Re: [fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-07 Thread Reinier Olislagers
On 7-10-2011 9:15, Graeme Geldenhuys wrote: I don't think that is needed. I believe the 'patch' program will sort that out by itself. I have sent numerous patches to FPC and Lazarus (both those repositories are git ones on my Linux system). Nobody has ever complained that the EOL style was

Re: [fpc-pascal] Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-07 Thread Reinier Olislagers
On 7-10-2011 15:13, Graeme Geldenhuys wrote: On 07/10/2011 12:52, Reinier Olislagers wrote: doesn't work - will need patch -p1 git.diff Correct, and anybody that has applied a handful of patches or more in there time would have known that already. ;-) Sure, but why add to the aggravation

[fpc-pascal] Re: Git line endings leading to patch problems - was [Semi-OT] Git format patches don't seem to work

2011-10-07 Thread Reinier Olislagers
On 7-10-2011 16:08, Graeme Geldenhuys wrote: On 07/10/2011 15:53, Reinier Olislagers wrote: Sure, but why add to the aggravation - SVN diff doesn't do this, so one less difference to worry about: It's still in the universal patch format, with or without the path prefixes. Also nobody should

[fpc-pascal] Windows API translation - or better way to update system tray?

2011-10-09 Thread Reinier Olislagers
Hi all, (See http://lazarus.freepascal.org/index.php/topic,14847.msg79038.html#msg79038 for initial question) My program starts and stops external programs that have icons. It would be nice to immediately clean up the icons from the system tray once those programs have stopped. I've found this

Re: [fpc-pascal] Windows API translation - or better way to update system tray?

2011-10-09 Thread Reinier Olislagers
On 9-10-2011 14:17, Sven Barth wrote: That's not C++, but C, but in both NULL can be used for both: pointers and ordinals. In Pascal HWND is an ordinal and there the correct equivalent is of course 0. So yes, you should use 0. Maybe you'll need to do this for the first param as well. Just goes

[fpc-pascal] Stunnel replaced by FPC?

2011-10-13 Thread Reinier Olislagers
Hi list, For my remote assistance screen sharing project https://bitbucket.org/reiniero/checkride/ I'm currently using stunnel on Windows to tunnel VNC traffic over an SSL/TLS tunnel. Can I replace stunnel with e.g. Synapse code? The Synapse documentation only shows https examples. I'd like to

[fpc-pascal] Reopen issue 20500: TSQLParser cant Parse Statements containing as

2011-10-17 Thread Reinier Olislagers
The issue reporter gave this example: select ORDERNO as OrderNo from ORDERS as Orders; It does parse AS, but only for a field. Michael Van Canneyt replied: TSQLParser implements SQL syntax as used in Firebird, and firebird does not allow AS for a tablename, just append the alias. The correct

Re: [fpc-pascal] Reopen issue 20500: TSQLParser cant Parse Statements containing as

2011-10-17 Thread Reinier Olislagers
On 17-10-2011 20:57, Michael Van Canneyt wrote: Would it make sense to reopen this bug? ? Eh ? If indeed it is accepted, then yes please. Quite strange, because I implemented the SQL parser based on the official Firebird server docs. And it definitely was not allowed. But I'll test on

Re: [fpc-pascal] Reopen issue 20500: TSQLParser cant Parse Statements containing as

2011-10-19 Thread Reinier Olislagers
On 18-10-2011 7:13, Reinier Olislagers wrote: On 17-10-2011 20:57, Michael Van Canneyt wrote: Would it make sense to reopen this bug? ? Eh ? If indeed it is accepted, then yes please. Quite strange, because I implemented the SQL parser based on the official Firebird server docs

[fpc-pascal] Re: How to insert a record and get the primary key with sqldb?

2011-10-24 Thread Reinier Olislagers
On 22-10-2011 15:33, michael.vancanneyt-0is9kj9s...@public.gmane.org wrote: On Sat, 22 Oct 2011, Marco van de Voort wrote: In our previous episode, Felipe Monteiro de Carvalho said: Ok, now I want to insert a record in my table and I would like to obtain the auto-generated PrimaryKey

Re: [fpc-pascal] Re: How to insert a record and get the primary key with sqldb?

2011-10-24 Thread Reinier Olislagers
On 24-10-2011 11:14, michael.vancann...@wisa.be wrote: On Mon, 24 Oct 2011, Reinier Olislagers wrote: Also, using INSERT...RETURNING it's very well possible to get the sequence value directly when inserting the data. Yes, but not all DBs support this. We use Firebird a lot, and it didn't

[fpc-pascal] Spatialite (a GIS extension to Sqlite) SQLite Load_extension

2011-11-07 Thread Reinier Olislagers
Hi all, I'm looking into getting road, vegetation, building etc. data from OpenStreetmap and generating a map for the Rigs of Rods truck/driving/flight/boat simulator using FPC/Lazarus if possible. I've found Spatialite [1], an extension to the SQLite database engine, that allows e.g. easy

[fpc-pascal] SQLite Load_extension seems to be working

2011-11-07 Thread Reinier Olislagers
On 7-11-2011 8:23, Reinier Olislagers wrote: 2. You can apparently load the spatialite (and dependencies) dll/so as an extension to SQLite, with a statement like [3] select load_extension('libspatialite-4.dll'); However, it seems you have to enable the extension load mechanism first using

Re: [fpc-pascal] SQLite Load_extension seems to be working

2011-11-07 Thread Reinier Olislagers
On 7-11-2011 10:49, michael.vancann...@wisa.be wrote: On Mon, 7 Nov 2011, Reinier Olislagers wrote: On 7-11-2011 8:23, Reinier Olislagers wrote: Attached diff (against fixes_2_6) seems to work for letting SQLite load the libspatialite extension snip I'll upload the diff as a patch unless

[fpc-pascal] Re: ioda joda fulltext search not working

2011-11-12 Thread Reinier Olislagers
On 12-11-2011 4:44, noreply-buo9vyj1...@public.gmane.org wrote: I was reading recently that MySQL has fulltext on InnoDB built in.. don't know much about it but I came across that recently while googling. Firebird has no fulltext built in to it I guess, eh? No, but there was an effort to

[fpc-pascal] [OT] AI programming challenge includes FreePascal

2011-11-14 Thread Reinier Olislagers
Hi all, In case you didn't know and are interested, there is an online artificial intelligence competition [1] that lets you program an ant colony that fights other colonies. There's a FreePascal starter kit available as well. You can test your program against others now; your submission needs

[fpc-pascal] Makeskel error or error behind keyboard?

2011-11-14 Thread Reinier Olislagers
Hi list, Trying to start documenting fpXMLXSDExport: some other directoryc:\development\fpc\bin\i386-win32\makeskel --disable-private --emit-class-separator --update --package=fcl --input=C:\development\Fpc\Source\packages\fcl-db\src\export\fpxmlxsdexport.pp --output=fpxmlxsdexport.xml MakeSkel -

Re: [fpc-pascal] Makeskel error or error behind keyboard?

2011-11-15 Thread Reinier Olislagers
On 15-11-2011 9:50, michael.vancann...@wisa.be wrote: On Tue, 15 Nov 2011, Sven Barth wrote: Am 14.11.2011 17:11, schrieb Reinier Olislagers: Snippet of the code in question: TCustomXMLXSDExporter = class(TCustomFileExporter) const DefaultDatasetName = 'Table1

  1   2   3   4   5   6   7   8   >