RE : [fpc-pascal] Re: SQLDB GetSchemaInfoSQL for indexes etc?

2012-04-19 Thread Ludo Brands
> Thinking about column names I would suggest, change it according to > SQL-Standard (information_schema views). To be fully compatible. > (because ATM we are not compatible with SQL-Standard NOR Delphi) > Advantage will be, that we will be able do for example 'select * from > INFORMATION_SCHEM

RE : RE : [fpc-pascal] Re: SQLDB GetSchemaInfoSQL for indexes etc?

2012-04-19 Thread Ludo Brands
>Ludo here I do not understand what do you want to say. may be, that my english is not so good ;-) >Can you explain please what is your proposal regarding to stIndexes ? stIndexes is currently not implemented: keep it that way (or drop it) but add and implement stTableConstraints, stReferential

RE : [fpc-pascal] Re: RE : RE : Re: SQLDB GetSchemaInfoSQL for indexesetc?

2012-04-19 Thread Ludo Brands
> > Has anybody used this functionality in sqldb at all? > > No. For a simple reason: > > I implemented all this information in fpdatadict; > I think it belongs more there, and definitely not in the > basic data API. > Some of the metadata are necessary in the basic data API (tables, columns

RE : [fpc-pascal] Re: RE : RE : Re: SQLDB GetSchemaInfoSQL for indexesetc?

2012-04-19 Thread Ludo Brands
> Now, supposing it must remain in sqldb: > > I do not know if the calls for schema information will > provide all info that datadict needs. If they do not, then I > must re-implement them in datadict. If they do, then the > default fpdatadict information retrieval routines > can use the new s

RE : RE : [fpc-pascal] Re: RE : RE : Re: SQLDB GetSchemaInfoSQL forindexesetc?

2012-04-19 Thread Ludo Brands
> But adding some aliases and add new features such as > octet_length should > not be a problem (NUMERIC_SCALE exists in precision). > And where exist NUMERIC_PRECISION then? This is used in databases like Oracle that use numerics. A number(10,4) has precision 10 and scale 4, radix 10. Ludo

RE : RE : [fpc-pascal] Re: RE : RE : Re: SQLDB GetSchemaInfoSQL forindexesetc?

2012-04-19 Thread Ludo Brands
> As for re-using existing terminology (schema data etc.), this > is dangerous > as it creates the expectation that the implementation > conforms to a certain > standard, which is what I want to avoid. > > (I don't believe I've ever used the word schema in connection > to a database. I think

RE : RE : RE : [fpc-pascal] Re: RE : RE : Re: SQLDB GetSchemaInfoSQLforindexesetc?

2012-04-19 Thread Ludo Brands
> > There are other databases (mssql, oracle) where it is > difficult to not > > use schemas. So even when not using the word 'schema' the concept > > should be represented somewhere. > > Ehm, the datadictionary is the schema ? > > Unless I misunderstand the meaning of schema :-) > Aha. That

RE : RE : RE : RE : [fpc-pascal] Re: RE : RE : Re: SQLDBGetSchemaInfoSQLforindexesetc?

2012-04-19 Thread Ludo Brands
> > > > Schemas "own" more objects than just Tables, Sequences and > Domains. So > > I wouldn't have guessed that one. > > Correct. fpDatadict is a work in progress. > > I use tables, sequences, domains, indexes and foreign keys. > Exactly because indexes and foreign keys have also an owner s

RE : RE : RE : RE : RE : [fpc-pascal] Re: RE : RE : Re:SQLDBGetSchemaInfoSQLforindexesetc?

2012-04-19 Thread Ludo Brands
> > Exactly because indexes and foreign keys have also an owner schema > > (CONSTRAINT_SCHEMA), I overlooked datadictionary. > > I am not familiar with these terms, so I totally fail to understand > the first part of your sentence... > > Is there somewhere a reference about 'schema' data ? >

RE : [fpc-pascal] SQLDB: logging all generated SQL?

2012-04-26 Thread Ludo Brands
> > I vaguely remember somebody mentioning SQLDB has the option > of dumping > > to a log all the SQL it sends to the database (in other > words: logging > > all SQL sent to the database). > > > > Can somebody tell me if that functionality is there and > where to find > > it? Perhaps somethin

RE : [fpc-pascal] Error in my mind or typo in sqldbtoolsunit.pas?

2012-04-30 Thread Ludo Brands
> ... however, I don't see any corresponding CREATE TABLE > FPDEV2 in the rest of the code or any mention of it? > In the TestFieldTypes unit there are several 'create table FPDEV2' whenever a special particular table is needed. Nowhere FPDEV2 is dropped. So I assume the unwritten convention is

RE : [fpc-pascal] Reversing bit-order of byte

2012-05-03 Thread Ludo Brands
> Hi, > > I'm porting a driver, originally written in C, for an LCD to be used > with an embedded arm-processor (STM32). > The original driver uses SPI, my driver will use a USART in > synchronous > mode because the STM32 has no SPI for 9-bit. Unfortunately, the > bit-order is reversed between

RE : RE : [fpc-pascal] Reversing bit-order of byte

2012-05-03 Thread Ludo Brands
> Thanks all for your replies. > I already found the RBIT-instruction. I also found out I need > to study > the arm assembly language ;-) > > But how do I get my variable ? Is that in some register ? Is > there any > documentation about such things ? Then I can use inline assembly. > ARM has

RE : [fpc-pascal] 2.6.0 for Solaris?

2012-05-09 Thread Ludo Brands
> > Hi, I was looking to try FPC but I saw the latest release > isn't available for Solaris, only 2.4something. Do you guys > plan on releasing the new version on Solaris? Do you intend > to keep supporting Solaris? > 2.6.0 is available for intel from ftp://ftp.freepascal.org/pub/fpc/dist/2.6.

RE : [fpc-pascal] Re: 2.6.0 for Solaris?

2012-05-09 Thread Ludo Brands
> > Your question, as given unambiguously in the subject line, relates to > 2.6.0. I'm telling you, equally unambiguously, that you don't > want to do > that. You might need to start off with an older binary to get > yourself > going, or you might be able to get hold of a binary for 2.6.0, bu

RE : [fpc-pascal] FPC + valgrind massif problems

2012-05-11 Thread Ludo Brands
> Hi, > > I wanted to debug where my program uses the most memory. > (There are no > memory leaks, but I want to optimize memory usage on some > large inputs. > As the code is quite large, simply guessing which part is responsible > becomes quite hard :) In the past, I happily used valgrind's

RE : [fpc-pascal] Parsing parameters inside an interpreter

2012-05-14 Thread Ludo Brands
> > I trying to build a very small interpreter. I can type commands like: > > $ add "Luciano de Souza" luchya...@gmail.com > > Somewhere in my code, I can have something like: > > procedure parse(commandline: string; var params: array of string); > > In this case, the commandline has the forma

RE : [fpc-pascal] Variable alignment in arm-embedded

2012-06-07 Thread Ludo Brands
> Hi, > > I want to make an interrupt-vector-table for the cortex-M3 processor. > When I read the docs of the processor good, the start of that table > needs to be on a multiple of $100 bytes in memory. Since with > FPC there > seems no way of getting that table in flash I need to have it in R

RE : RE : [fpc-pascal] Variable alignment in arm-embedded

2012-06-08 Thread Ludo Brands
> Thanks Ludo, > > I'll take that as a starting point. I hope I will not need the "lost" > 256 bytes in the future. I could be wrong but AFAIK if the compiler would do the alignment, the loss can also be up to 255 bytes. Here you lose 256 bytes in all cases. > I can replace the IntVectors-poin

RE : [fpc-pascal] Currency symbol wrong location

2012-06-09 Thread Ludo Brands
> This is as per doc? > > http://www.freepascal.org/docs-html/rtl/sysutils/format.html > > FloatToStrF(Argument,ffGeneral,Precision,3) > > MCurrency format. the next argument in the var{Args} > array must be a > floating point value. The argument is converted to a decimal > string using cu

RE : [fpc-pascal] Re: Playing sounds with standard components

2012-06-11 Thread Ludo Brands
> I took a look in Openal examples. I need to confess that I > expected something easier. Perhaps, something like: > > PlaySound('file.wav', 0) > > In MMSystem, we have something like that, but it's not cross platform. > > The examples present hundreds of lines. It's something frightful! > > R

RE : RE : [fpc-pascal] Re: Playing sounds with standard components

2012-06-11 Thread Ludo Brands
> On the lazarus forum, kpjcomp made a wrapper for Openal. Forgot the link: http://www.lazarus.freepascal.org/index.php/topic,17164.msg94588.html#msg945 88 Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/ma

RE : RE : [fpc-pascal] Re: Playing sounds with standard components

2012-06-12 Thread Ludo Brands
> Where do I find the openal_nt unit? > > unit1.pas(9,3) Fatal: Can not find unit openal_nt used by Unit1. > At the bottom of the forum page is a link to a complete demo project openaltest.zip that includes the units laz_openal and OpenAL_NT. Ludo __

RE : [fpc-pascal] Dynamically Execute method

2012-06-19 Thread Ludo Brands
> Seems to work for me, updated the example: https://gist.github.com/2950789 > > Or am O missing something ? Change your method to procedure TMyClass.SayHi; begin writeln('Hi World from '+IntToStr(ptruint(self))); end; And the test to write('From MyClass2 : '); MyClass2.SayHi; if not Exe

RE : RE : [fpc-pascal] Dynamically Execute method

2012-06-19 Thread Ludo Brands
> As Bern said you can't call an object method without passing > the reference to the instance. In this case you are lucky > because TMyClass.SayHi doesn't use any properties or class > vars. Add a property to TMyClass and try to writeln that > property and you will see it fails. What you are

RE : [fpc-pascal] Adding method dynamically to a class

2012-06-20 Thread Ludo Brands
They can, but there is a protocol that I'm trying to create that provides me information what to execute (out of white list). The thing is, that the first request maps the methods to be used, and there could be 2 or 200. To implement 200 methods that might be used is not a good idea imho, but add

RE : [fpc-pascal] Postgresql Concurrent Transactions

2012-06-22 Thread Ludo Brands
Each manager thread has its own Connection, Transaction, and TQuery. Each manager can handle potentially thousands of sockets Each server instance (1 process) can have up to ~100 manager threads. Each Manager executes socket "commands" that translate at some point, into a Database, Select, Upd

RE : [fpc-pascal] Windows Phone 8 + pascal

2012-06-24 Thread Ludo Brands
> Page http://en.wikipedia.org/wiki/Windows_RunTime > says that WinRT is a COM-based API and uses a .NET-like > metadata format. > So it is not native code after all then. I don't know why > they advertised it as native. I guess it is faster than .NET > code because it is not managed. I thought

RE : [fpc-pascal] Windows Phone 8 + pascal

2012-06-25 Thread Ludo Brands
>> >> A typelib importer is already in svn. > Which won't be of much use for WinRT as this metadata is > based on the metadata that .NET assemblies already use and not on IDL. >From .net assemblies a TLB type library can be extracted with the regasm or tlbexp .net tools. The typelib importer read

RE : [fpc-pascal] How can a project determine if it's using cmem?

2012-07-04 Thread Ludo Brands
> How can code in the library test whether it is using cmem, so that it > can tell the caller that it's safe to call functions that > move strings > and objects around? It's obviously trivial to rely on a compile-time > conditional, but can this be done in a way that doesn't rely on this? > F

RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Following up on bug 22310 http://bugs.freepascal.org/view.php?id=22310 > > I enabled the use of UTF8 in the FPC JSON support. > > The constructors of the JSON parser/scanner now accept an > extra argument > UseUTF8 which tells them to convert JSON strings to UTF8, not > the system codepage.

RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Because the old behaviour is not "buggy". > > It simply did not support Unicode, and does the next best thing, > in casu: it transforms to the system codepage. > > A car without ABS and SAT-Nav is not buggy. > It just doesn't support features which are nowadays called > standard. You can per

RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> So you'd reverse the constructor boolean argument to specify > Utf8 as default, > and let the user choose the old behaviour if he needs it ? > If that is "unthinkable" then define new contructors TJSONParser.Create2(...,AUseUTF8 : Boolean = True) or Create2(...,AUseUTF8 : Boolean = True) and m

RE : RE : RE : RE : [fpc-pascal] JSON and UTF8

2012-07-10 Thread Ludo Brands
> Nothing is unthinkable. The other constructs are very ugly. > > I reversed the argument default value to True. UTF8 is now > the default. > A very wise decision;) Ludo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freep

RE : [fpc-pascal] Database problem on Solaris SPARC

2012-07-12 Thread Ludo Brands
> I've found a problem when a (well-tested) program that connects to a > PostgreSQL database is compiled and run on Solaris 10 for > SPARC, Linux > SPARC is OK. > > I appreciate that this is a minority platform, but would I be less > unpopular reporting it against 2.6.0 or testing it against

RE : [fpc-pascal] Database problem on Solaris SPARC

2012-07-12 Thread Ludo Brands
> > We only support 32 bit SPARC, and there we split a 64 bit load into > > two > > 32 bit loads. dbl, assuming it points to a double, should > point to a 64 > > bit-aligned memory location though (depending on the cpu, 32 bit > > alignment may be sufficient, but better be safe than sorry). >

RE : [fpc-pascal] Dynamic messaging in Delphi

2012-07-26 Thread Ludo Brands
http://www.freepascal.org/docs-html/rtl/sysutils/supports.html > I'm getting an identifier not found error with the procedure > "Supports". Where is this defined? > > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal

RE : [fpc-pascal] FPC trunk seems to crash compiling Lazreport; was: Re: [Lazarus] Lazreport compilation problems with FPC trunk

2012-08-12 Thread Ludo Brands
> > I would suggest to start by not compiling the compiler or RTL > with stack checking enabled. > Is stack checking on by default? I encounter the same problem as Reinier and I build the compiler with OPT="-g -gl", nothing more. Ludo ___ fpc-pasca

RE : RE : [fpc-pascal] FPC trunk seems to crash compiling Lazreport; was: Re: [Lazarus] Lazreport compilation problems with FPC trunk

2012-08-13 Thread Ludo Brands
> > I encounter the same problem as Reinier and > > I build the compiler with OPT="-g -gl", nothing more. > > Then it's probably something else. > Problem is caused by the changes in rev 21972. Code iterates now indefinitely TDebugInfoStabs.field_write_defs, TDebugInfo.appenddef, TDebugInfoStabs.

RE : [fpc-pascal] Re: linux: should we hard-code versioned orunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> So why does FCL-DB look at the unversioned *.so by default? > Wouldn't it make more sense to change FCL-DB to look for > libfbclient.so.2 instead? 2 being the latest major version of > Firebird DB, and that is also the latest version that > ibconnection.pp was written for. > Completely agree

RE : RE : [fpc-pascal] Re: linux: should we hard-code versionedorunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> No, this would suggest that you can set a different value for > each instance. > I don't see what is wrong with that. You get a nice exception when you try to load a different library than the one that is alread loaded. But if I want to make an app that works with embedded firebird or firebird c

RE : RE : RE : [fpc-pascal] Re: linux: should we hard-codeversionedorunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part > de Michael Van Canneyt > > I don't see what is wrong with that. You get a nice > exception when you > > try to load a different library than the one th

RE : RE : RE : [fpc-pascal] Re: linux: should we hard-codeversionedorunversioned shared libraries in our apps?

2012-08-15 Thread Ludo Brands
> > You can't be connected the 2 at the > > same time but that is a run-time issue, not design time. > > I'm not sure I'm following. Do you mean SqlDB can't connect > to two different database at the same time? I can't think > that is true, so could you explain this limitation you are > talking

RE : RE : RE : [fpc-pascal] Re: linux: should we hard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> And IMHO this all reeks of that. (dll name in component). > Sounds "easy", but it doesn't really solve anything. > Making it easier for the programmer to specify the library he wants will put a halt on "this discussion returning in some way or the other every 6-9 months". What is recurring in

RE : RE : RE : RE : [fpc-pascal] Re: linux: should wehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> > We differ only in the implementation of the 'easier way': > > I meant that I do not see the advantage of writing something like > > With Inifile do > begin > > IBConnection1.LibraryName:=ReadString('Connection','libraryNam > e','fbclient.dll'); > end > > over >With IniFil

RE : RE : RE : RE : RE : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> Remains the fact that I think that - no matter what the other > component sets do > - the library name should NOT be a connection component > property, unless you > allow each connection to use a different library. Since that > is not possible > with the current *dyn units, the property sho

RE : RE : RE : RE : RE : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> > Unfortunately your example illustrates nicely the difference. > > InitializeInterbase is unknown in the fpc I'm using. > InitialiseIBase60 > > does exist but you have to add the non-trivial ibase60dyn > to the uses > > clause to get to it (Google has 146 hits for > "InitialiseIBase60", no

RE : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversionedshared libraries in our apps?

2012-08-16 Thread Ludo Brands
> Well, first of all, I don't think something needs to be > changed in the first place :) > > So, if we must do something extra anyway, then I prefer it to be the > correct solution, and not a shortcut. > And that is how also this attempt to improve sqldb grinds to a halt ... Ludo __

RE : RE : RE : RE : RE : RE : [fpc-pascal] Re: linux:shouldwehard-codeversionedorunversioned shared libraries in our apps?

2012-08-16 Thread Ludo Brands
> > It is a different story but an integral part of this particular > > problem. Why else has the "solution" to be spelled out > everytime the > > problem pops up? You'll say people don't make the effort to > read old > > messages. But in this thread alone you'll find a > "InitializeInterbase

RE : RE : [fpc-pascal] Re: linux:shouldwehard-codeversionedorunversionedshared libraries in our apps?

2012-08-16 Thread Ludo Brands
> Why do you say that? > > It's not because I personally think that no extra solution is needed, > that I am oblivious to the problems of users. > > We'll solve the problem, thereby improving sqldb. > I will implement it myself next week: > > * Change default library names to make more sense.

RE : [fpc-pascal] Malformed email messages

2012-08-16 Thread Ludo Brands
> -Message d'origine- > De : fpc-pascal-boun...@lists.freepascal.org > [mailto:fpc-pascal-boun...@lists.freepascal.org] De la part > de Henry Vermaak > Envoyé : jeudi 16 août 2012 15:28 > À : FPC-Pascal users discussions > Objet : Re: [fpc-pascal] Malformed email messages > > > On 16/

RE : RE : RE : [fpc-pascal] Re:linux:shouldwehard-codeversionedorunversionedsharedlibraries in our apps?

2012-08-16 Thread Ludo Brands
> > I'm glad to see I was mistaken in interpreting the way this > discussion > > was going. Probably seen too many other discussions and initiatives > > that end up nowhere. > > Tatata. Don't sell the bearskin before the bear has been shot. > > You can be glad when I actually commit the soluti

Re : [fpc-pascal] Re: linux: shouldwehard-codeversionedorunversionedsharedlibraries in our apps?

2012-08-16 Thread Ludo Brands
> If someone knows the correct version numbers for the various > postgres and mysql libs, > that would be appreciated. > libpq.so.3 pg 7.3 7.4 libpq.so.4 pg 8.0 8.1 libpq.so.5 pg >= 8.2.4 libmysqlclient.so.13mysql 4.0 libmysqlclient.so.14mysql 4.1 libmysqlclient.so.15mysql 5.0

Re : [fpc-pascal] Malformed email messages

2012-08-17 Thread Ludo Brands
> > > One of Ludo's later messages gives me: > > > > RE : RE : RE : RE : RE : [fpc-pascal] Re: linux: > > shouldwehard-codeversionedorunversioned shared libraries in > our apps? > > > > In gmail's web client, the conversation view only shows the > original > > subject at the top, but it's st

Re: Re : [fpc-pascal] Malformed email messages

2012-08-17 Thread Ludo Brands
> > > > I wrote a little VBA module in Outlook that modifies the > RE: back to > > Re: before sending the message and that seems to solve the problem. > > Almost. You now have an "Re :" in the front, and not a "Re:". > Removing > the space before the colon should fix it completely I think. >

Re: [fpc-pascal] FPC vs Delphi's unicode string support questions

2012-08-18 Thread Ludo Brands
> Only in {$mode delphiunicode} (which is what you should use if you > want to compile code written for a Delphi version in which > string=unicodestring). > Is this hidden gem announced or documented somewhere? Is there a -M compiler switch to set it as default language mode? FPC doesn't list

Re: [fpc-pascal] Possible RTFM question: is there something like anIsRootPath() function?

2012-08-20 Thread Ludo Brands
> I ended up with this: > > function IsRootPath(APath: String): Boolean; > //crude function, it maybe needs support for UNC drives > var > D: String; > Len: Integer; > begin > D := ExtractFileDrive(APath); > Len := Length(D); > System.Delete(APath, 1, Len); > Result

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> > After recent discussions about which library to load when > loading DB client libraries, I changed the default names for > Firebird, MySQL, Postgres. > That was well in time ;) Thanks. Another little bug and patch in http://bugs.freepascal.org/view.php?id=22691 Ludo

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> (In the IDE: drop, set connector type from picklist, maybe > change library name, set to enabled). > I'm having some problems using this in the IDE. The picklist is empty. Probably something missing in procedure TSQLDBConnectorTypePropertyEditor.GetValues( Proc: TGetStrProc); Var L : TSt

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> Also, if I understand the mode of operation correctly, the > TSQLDBLibraryLoader, when enabled, loads the library before > the TxxxConnection tries to load it. But how can you be sure > TSQLDBLibraryLoader is streamed before a TxxxConnection that > has connected set to true > Previous messag

Re: [fpc-pascal] TSQLDBLibraryLoader committed for SQLDB

2012-08-22 Thread Ludo Brands
> There are more problems: the library name is not > cross-platform, so the project will no longer be > cross-platform. Which is a far more serious problem, IMHO. > (and one which would exist even if I had followed your > suggestion of implementing the property in TSQLConnection). > That is no

Re: [fpc-pascal] Resource compiler under Linux - windres?

2012-09-01 Thread Ludo Brands
> Does anybody know if there is a 'winres' for non-Windows > platforms? How > do I compile *.rc files into *.res files under Linux, FreeBSD etc? Or > does Linux/*BSD executables simply not support such resources? > Windres for linux can be found in the cross binutils for windows. When installed

Re: [fpc-pascal] Firebird: bulk insert performance: suggestions?

2012-09-07 Thread Ludo Brands
> For my Dutch postcode program https://bitbucket.org/reiniero/postcode > with an embedded Firebird 2.5 database, I allow users to read > in a CSV file with new or updated postcode data. I use sqldb, > FPC x86. I'd like to get your suggestions on speed improvements. > Turn of indices when inser

Re: [fpc-pascal] Re: Firebird: bulk insert performance: suggestions?

2012-09-07 Thread Ludo Brands
> > Do you prepare the query before you start the batch ? > > If not, it is prepared on every insert, which is inherently slower. > I didn't do an explicit .Prepare, but I've added it, thanks. > I thought sqldb would prepare automatically if you are using > parameters though? sqldb always uses a

Re: [fpc-pascal] Re: Firebird: bulk insert performance: suggestions?

2012-09-07 Thread Ludo Brands
> If it prepares the statement automatically, it also > unprepares it. (at least, it should :) ) > I does for every change in query, connection, transaction, active state of dataset, filter, etc. , but not at the end of an execsql. Ludo ___ fpc-pascal

Re: [fpc-pascal] FBAdmin

2012-09-13 Thread Ludo Brands
> A few questions regarding FBAdmin: > > - Will FBAdmin be backported to 2.6.1? > I can't comment on that. > - Will more functionality be added to it? In particular the > setting of > Forced Writes (I could perhaps supply a patch then). > Not from my side. Purpose of TFBAdmin was to provide

Re: [fpc-pascal] FBAdmin

2012-09-14 Thread Ludo Brands
> It is already quite a useful component as is. Since you are FBAdmin's > author, and are knowledgeable in the service API, what do you > recommend > regarding the non basic admin actions? Forced Writes in particular is > interesting as it might have to be turned off when pumping > data for ex

Re: [fpc-pascal] Re: SDFDataset users!?

2012-09-24 Thread Ludo Brands
> > Is there some defined on-disk format that sdfdataset should be > > following? > > As I understood it, it is either fixed length or CSV. > CSV as in http://tools.ietf.org/html/rfc4180 > > That is in contradiction with the existing implementation as well as the following comments following

Re: [fpc-pascal] Re: SDFDataset users!?

2012-09-24 Thread Ludo Brands
> > That is in contradiction with the existing implementation > as well as > > the following comments following comments in SDFData.pp > > > > 14/Ago/01 Version 2.00 (Orlando Arrocha) > > John Dung Nguyen showed me how to make this > compatible with > > You are erroneously assuming I

Re: [fpc-pascal] DOM, XMLRead, XMLWrite - cwstring requirement

2012-09-28 Thread Ludo Brands
> > No, it is just for the XML reader, since it uses widestrings: > > Ah, so it only takes affect on the WideString type, not the > String type. I guess from the name 'widestring manager' I > should have seen that relationship. :) > Using cwstring does affect some ansistring functions. It come

Re: [fpc-pascal] TurboPower FlashFiler for Free Pascal

2012-10-23 Thread Ludo Brands
> > If I understand Graeme correctly, he wants it compiled-in > (i.e. without dll). SQLite is a separate DLL. > See http://forum.lazarus.freepascal.org/index.php/topic,15712.msg84781.html#msg8 4781 for instructions on static linking of sqlite3. No dll needed. Ludo ___

Re: [fpc-pascal] Oracle driving me crazy - please provide dried frog pills[1]

2012-12-03 Thread Ludo Brands
On 03/12/2012 16:44, Reinier Olislagers wrote: Been fiddling with the Oracle connector. This: using the scott schema on Oracle 10g, this works fine in my JDBC query GUI and in sql*plus: select * from scott.emp where JOB='CLERK'; However, in code (FPC trunk x86, Windows), this: Q.SQL.Text:='sele

Re: [fpc-pascal] GetTableNames in TSQLConnection / Postgresql

2012-12-17 Thread Ludo Brands
On 17/12/2012 10:45, michael.vancann...@wisa.be wrote: On Mon, 17 Dec 2012, LacaK wrote: Yes. May be, that I was not clear. My suggestion was 3+ fields in query: SCHEMA_NAME, TABLE_NAME, SCHEMA_TABLE_NAME (SCHEMA_NAME || '.' || TABLE_NAME) But original question AFAIU was about: what shoul

Re: [fpc-pascal] GetTableNames in TSQLConnection / Postgresql

2012-12-17 Thread Ludo Brands
The question is also why return SCHEMA_NAME || '.' || TABLE_NAME when this is not always usable in a query later on ? One DB needs "SCHEMA_NAME"."TABLE_NAME", another `SCHEMA_NAME`.`TABLE_NAME`. An additional option soQuoteNames? Well, if you don't need the concatenation, presumably you don'

Re: [fpc-pascal] Extending an enumeration

2012-12-28 Thread Ludo Brands
On 28/12/2012 11:42, Mark Morgan Lloyd wrote: Is it possible to extend an enumeration, while preserving strong type checking? In other words, given existing code like typeTUpstreamServerCapabilitiesBase= (uscConnected, uscCanIssueGUID); TLocalServerCapabilitiesBase= (lscConnected, l

Re: [fpc-pascal] Extending an enumeration

2012-12-28 Thread Ludo Brands
On 28/12/2012 12:48, Mark Morgan Lloyd wrote: Ludo Brands wrote: type TAllServerCapabilitiesBase=(uscConnected, uscCanIssueGUID,lscConnected, lscCanIssueGUID, lscIsFirebird); TUpstreamServerCapabilitiesBase= uscConnected .. uscCanIssueGUID; TLocalServerCapabilitiesBase= lscConnected

Re: [fpc-pascal] Extending an enumeration

2012-12-28 Thread Ludo Brands
On 28/12/2012 12:59, Ludo Brands wrote: On 28/12/2012 12:48, Mark Morgan Lloyd wrote: Ludo Brands wrote: type TAllServerCapabilitiesBase=(uscConnected, uscCanIssueGUID,lscConnected, lscCanIssueGUID, lscIsFirebird); TUpstreamServerCapabilitiesBase= uscConnected .. uscCanIssueGUID

Re: [fpc-pascal] How to get info about CPU and Memory usage?

2013-02-27 Thread Ludo Brands
On 02/27/2013 05:25 PM, Krzysztof wrote: > Hi, > > I need system info such CPU (by PID), memory usage (by PID), free memory > etc. Target platform: Linux. > Linux have command line tools like ps, top, memstat, but I'm just > wondering if Free Pascal has wrappers for these commands. If not, then I

Re: [fpc-pascal] Place of elements in record

2013-02-28 Thread Ludo Brands
On 02/28/2013 08:59 AM, Koenraad Lelong wrote: > Other solutions ? > type EEPROM_Content= record Var1 : byte; Var2 : word; Var3 : byte; end; ... @EEPROM_Content(nil^).Var2 gives you the relative address of Var2 in the record. Calculated at compile time. Ludo _

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 09:14 AM, Max Vlasov wrote: > Hi, > > Working with lazarus on Linux Mint I noticed that when I mount a windows > shared with "Connect to server", everything works fine (Nautilus, > Midnight Commander, Lazarus file operations). But meeting that .gvfs > folder is hidden, I tried to mou

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 10:55 AM, Max Vlasov wrote: > > On Fri, Mar 1, 2013 at 12:32 PM, Ludo Brands <mailto:ludo.bra...@free.fr>> wrote: > > On 03/01/2013 09:14 AM, Max Vlasov wrote: > > > > The question is what is different in nautilus and midnight c

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 12:52 PM, Sven Barth wrote: > Currently FPC allocates only one pdirent in fpopendir > (rtl/linux/ossysc.inc). Maybe it should first stat the directory and > then decide based on st_blksize how much pdirent entries to allocate > (but it should also provide a sane default, as there is

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 06:02 PM, Sven Barth wrote: > > While the kernel might pass less than 256 characters the dirent > structure contains a "dd_nextoff" field which is already used in FPC's > fpreaddir call to locate the next returned entry. > Yes, I know. Otherwise we would lose more than one file na

Re: [fpc-pascal] Findfirst/findnext with a samba share

2013-03-01 Thread Ludo Brands
On 03/01/2013 04:37 PM, Michael Van Canneyt wrote: > > On Fri, 1 Mar 2013, Ludo Brands wrote: > >> What about just using a 32k buffer? > > No problem with that as far as I am concerned. > > Since the code is shared between embedded and non-embedded targets, it &g

Re: [fpc-pascal] Solution for Timer in daemon

2013-03-02 Thread Ludo Brands
On 03/01/2013 07:10 PM, Krzysztof wrote: > Hi, > > I'm reading that I can't use timer in daemon because daemon core is > based on thread. daemonapp is using threads but nothing stops you from daemonizing your app yourself with a simple fork. > So I'm trying to create another thread which simul

Re: [fpc-pascal] Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-09 Thread Ludo Brands
On 03/09/2013 02:08 PM, Mark Morgan Lloyd wrote: > I don't know whether anybody can help me with this one, but I'm working > on something where I need a program to be able to create login-capable > database users on-the-fly. I was hoping to be able to use either > PostgreSQL or Firebird as the back

Re: [fpc-pascal] Connecting to Firebird using FPC/Lazarus over a LAN with user creation privilege

2013-03-09 Thread Ludo Brands
On 03/09/2013 03:03 PM, Tony Whyman wrote: > Mark, > > You should be able to do this using the Firebird Services API. IBX > exposes this API under the Firebird Admin tab and the TIBSecurityService > class is what you are looking for. > > This has methods to > > "DisplayUsers", which gets info on

Re: [fpc-pascal] Re: a proposal about "with" syntax

2013-03-18 Thread Ludo Brands
On 03/18/2013 02:30 PM, leledumbo wrote: >> I cannot recall if there is already a notion of "alias" in free pascal, if > not then we just introduce this idea within the scope of "with" expression. > > Let me give you one then: > > procedure p; [public, alias: 'my_p']; > And another one: var

Re: [fpc-pascal] FBAdmin

2013-03-24 Thread Ludo Brands
On 03/24/2013 10:54 AM, Mark Morgan Lloyd wrote: > I've added a call to FBAdmin to what I'm working on, to get the full > description of the server (i.e. comparable to PostgreSQL's version() > function). Thanks Ludo :-) > > Is it possible to piggyback this onto an open Firebird connection, in > ca

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-26 Thread Ludo Brands
On 03/26/2013 10:40 AM, Sven Barth wrote: > Am 26.03.2013 06:53, schrieb Anthony Walter: >> I wasn't asking you to stop your work, rather I was attempting to >> share insights and my opinions with the group. My point in the >> previous message was that many times it make sense to reuse something >

Re: [fpc-pascal] Re: TPQConnection: Duplicated error message.

2013-04-05 Thread Ludo Brands
On 04/05/2013 09:10 AM, Reinier Olislagers wrote: >> I'm sure the guy who implemented this (I think Ludo Brands) can tell you > exactly what's going on. > Yes;) The background of spitting out the complete error detail was people complaining about not getting the hints as

Re: [fpc-pascal] Portable (or at least working) version of GetDomainName()?

2013-04-09 Thread Ludo Brands
On 04/09/2013 10:14 AM, Mark Morgan Lloyd wrote: > > It might be notable that Debian doesn't volunteer a domain name unless > it's able to contact DNS. I'll get onto nslookup, or just use temporary > text (it's only salt for a password hash, and is stored). > One of the problems with uname is t

Re: [fpc-pascal] Why does this work?

2013-04-12 Thread Ludo Brands
On 04/12/2013 11:47 AM, Reinier Olislagers wrote: > if (FNullField <> nil) and (Dst = nil) and (AFieldDef.NullPosition >= > 0) then > begin > Src := PChar(Src) + FNullField.Offset + (AFieldDef.NullPosition shr 3); > Result := (PByte(Src)^ and (1 shl (AFieldDef.NullPosition and $7))) = 0

Re: [fpc-pascal] SqlDB vs Zeos: TDataset.FieldDefs[].Size

2013-04-20 Thread Ludo Brands
On 04/19/2013 05:59 PM, Graeme Geldenhuys wrote: > Hi, > > I have a Firebird database living on a FreeBSD server. I did not specify > a charset when the database was created. > > I have a table with a string field defined as VarChar(10). > > When I use SqlDB and retrieve the Size of that field v

Re: [fpc-pascal] Statically link library

2013-04-20 Thread Ludo Brands
On 04/20/2013 11:54 AM, Darius Blaszyk wrote: > Hi, > > I'm linking a C and FPC program but I keep on getting undifined symbols > (see example below). > > Error: Undefined symbol: _strcpy > Sofar I have added: > > {$linklib msvcrt} > {$linklib gcc} > > What other libraries should I add? BT

Re: [fpc-pascal] Statically link library

2013-04-24 Thread Ludo Brands
On 04/23/2013 10:14 PM, Darius Blaszyk wrote: > > > Thanks Ludo! Works perfectly also here. However for my understanding. Why > does MinGW find open, filesize etc? Is there some header file that > "translates" these functions to be compatible with msvcrt? If not I would > have to create one my

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-24 Thread Ludo Brands
On 04/24/2013 10:21 PM, silvioprog wrote: > 2013/4/24 silvioprog mailto:silviop...@gmail.com>> > > Hello, > > There are a multi-thread example using SSockets in FPC? > > I'm trying to implement it*, but it's very hard and this work it's > consuming all my time. The difficulty is

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: > > > On Thu, 25 Apr 2013, silvioprog wrote: > >> I do not know where it would be used, it's just an observation hehe... > > Yes, but the above is what I mean with 'it does not make much sense'. > > I can easily add this - in fact I will do so

Re: [fpc-pascal] Re: Odyssey: SSockets and Threads.

2013-04-26 Thread Ludo Brands
On 04/26/2013 09:19 AM, Michael Van Canneyt wrote: > > > On Fri, 26 Apr 2013, Ludo Brands wrote: > >> On 04/26/2013 08:58 AM, Michael Van Canneyt wrote: >>> >>> >>> On Thu, 25 Apr 2013, silvioprog wrote: >>> >>>> I do not know wh

Re: [fpc-pascal] Statically link library

2013-04-26 Thread Ludo Brands
On 04/26/2013 09:54 AM, Darius Blaszyk wrote: > > On Apr 26, 2013, at 1:37 AM, Paul Breneman wrote: > >>> Yes it does find them, the statically libraries are linked into an >>> executable which works fine. That is why I was surprised. I'm sure MinGW >>> must link to other libraries as well

  1   2   3   4   >