Re: What would you use?


On 2008-04-22, Kevin Powick wrote:
> Paul Hughes wrote:
>
>> This is a very general question. I'm trying to get a feel for the
>> current trends and practices that you others would follow given the
>> following situation.
>
> For a database, PostgreSQL - Completely free, powerful, stable.

How do you interface with it from Delphi
Posted On: Wednesday 3rd of October 2012 02:09:14 AM Total Views:  80
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




Quickreports

Whats happened to Quickreports its not in my D2007 Rita
VIEWS ON THIS POST

82

Posted on:

Monday 1st October 2012
View Replies!

Keypressed

, usually I make use of "keypress" event in Tedit object to catch the character #13 (Enter). Anyway in one of mine application the keypress event semms does not fire when enter is pressed ! I noticed that if there is a bitbutton with "default: = true" it catches the Enter event. But even removing such condition, in this specific my application, any edits do not handle "enter". What else I have to check How I can know which is catching Tedit keypress when Enter is pressed Tahk you.
VIEWS ON THIS POST

78

Posted on:

Monday 1st October 2012
View Replies!

Prevent COM object from loading

I'm creating a COM object in a Dll file and I'd like to create a trial version that is limited to 30 days use. For that, I'm planning to have the COM object write a date in the registry when it is first used and test for expiry of the trial period each time it is used. Because execution time is critical (the COM object are used for providing sorting mechanisms for large databases), I don't want to have to test for expiry of the trial period each time one of the function is called (even saving the test result in a variable and doing a simple "If FTrialHasExpired Then ..." at the start of each exposed function is too much execution time for me). I'd therefore like to test once for this expiry, when the COM object loads/instanciate and prevent it loading if necessary. My question: I have the following object that inherits the interface: TCoMyCOMObject = Class(TAutoObject, IMyCOMObject) If I overwrite its Create contructor (as depicted below), and if I raise an exception in that constructor (when the trial period has expired), will it prevent the COM object from being properly loaded/intanciated and its function used Constructor TCoMyCOMObject.Create; Begin Inherited; If Not CheckExpiryTrialPeriod Then Raise Exception.Create('The trial period has expired. Please, purchase the fully functional utility.'); End;
VIEWS ON THIS POST

249

Posted on:

Monday 1st October 2012
View Replies!

CreateProcess + osk.exe = 740

s :-) I write this mail because I am really desperate about the following problem. Recently I encountered a really strange problem with osk.exe - the on-screen keyboard. I've tried to create the process with CreateProcess in Windows Vista (SP0 + Sp1) with activated UAC. (again: Windows Vista (SP0 + Sp1) + active UAC) (please read the next sentence twice!!) However I failed miserably with error 740 (elevation required), although I call this code with administrative privileges. (Delphi is admin btw) It only works without a manifest and an activated program compatibility manager. Any binary with a manifest fails always (again: binary + manifest = 740) You can read a detailed report in the JEDI API blog. http://blog.delphi-jedi.net/2008/05/...ss-and-oskexe/ There are binary files for download at the end of article. Maybe you can test it
VIEWS ON THIS POST

79

Posted on:

Monday 1st October 2012
View Replies!

Unable to Find or Create any Code to Set Printer Source or Bin

After searching the internet for 2 days I am unable to create any code that sets a printers source or bin. Why doesn't this work The code executes but does not change the bin procedure SetPaperBin( PrtrName: string; Bin: word ); var hndPrinter: Thandle; BuffSize: integer; PtrPrtrInfo2: PPrinterInfo2; begin OpenPrinter( PChar( PrtrName ), hndPrinter, nil ); {get size of buffer for printer info 2} GetPrinter( hndPrinter, 2, nil, 0, @BuffSize ); PtrPrtrInfo2 := ocMem( BuffSize ); {get printer info 2 ...} GetPrinter( hndPrinter, 2, PtrPrtrInfo2, BuffSize, @BuffSize ); {... change bin if selected bin current bin} if ( PtrPrtrInfo2^.pDevMode^.dmDefaultSource Bin ) then begin PtrPrtrInfo2^.pDevMode^.dmDefaultSource := Bin; WinSpool.SetPrinter( hndPrinter, 2, PtrPrtrInfo2, 0 ); end; ClosePrinter( hndPrinter ); FreeMem( PtrPrtrInfo2 ); end; As a suggestion to CodeGear.... Delphi needs better information in the help file for setting up printers as well as new components to set printer settings not available in TPrinter.
VIEWS ON THIS POST

130

Posted on:

Monday 1st October 2012
View Replies!

Re: FastMM Still Required?

On 2008-04-17, Remy Lebeau (TeamB) wrote: > > "Alan Rose" wrote in message > news:48068e79$1@newsgroups.borland.com... > >> Hi I understand some of the memory management routines >> in FasttMM is now in the recent versions of Delphi. > > Not some - all. FastMM is the new memory manager now. The old Borland > memory manager is gone. One can still dl it off BDN. I run D2006 with the old one.
VIEWS ON THIS POST

122

Posted on:

Monday 1st October 2012
View Replies!

"External" shared very fast index

On Sat, 17 May 2008 07:35:40 +0200, Rolf Lampa [RIL] wrote: > The idea/approach which is best/fastest/simplest to implement wins. What's the prize I would probably just use multi-threading, but since you are against that how about using a single instance COM server (all clients share the same instance). -- Marc Rohloff [TeamB] marc -at- marc rohloff -dot- com , On Sat, 17 May 2008 16:30:04 +0200, Rolf Lampa [RIL] wrote: > DCOM sounds reasonable, should be fairly fast too. > > It's not really necessary to have access to the index over a network though. A > shared index is probably of most value for multiple instances on one machine. Which is why I didn't recommend DCOM. DCOM is actually just COM running remotely, you can usually use an identical executable and just make some registry changes. -- Marc Rohloff [TeamB] marc -at- marc rohloff -dot- com
VIEWS ON THIS POST

96

Posted on:

Monday 1st October 2012
View Replies!

COM Object not releasing handle

I have a FoxPro COM object that is used to connect to FoxPro tables. It works fine but for some reason I cannot get the handle count to decrease. This is what I do in the constructor of the class: lFoxLib := CreateOleObject(FOX_OLE_CLASS); In the destructor I do the following: lFoxLib := null; I don't know much about COM stuff but I expect the handle count to decrease when I free the object. There is also a similar problem in Zeos controls when using ADO. The handle count never goes down it always increases. Although the handle count in standard TADO controls(of Delphi) seem to work alright(the handle count here doesn't go down even if I close the dataset and disconnect from database. ). I am working with MSSQL200. Any suggestions Sandeep
VIEWS ON THIS POST

95

Posted on:

Tuesday 2nd October 2012
View Replies!

What's the future hold for the 'Together' features in the IDE? Willthey get dropped?

Personally I don't like most of the Together features and don't use most of them. I find the QA Audits and QA Metrics and the modelling features completely crap. Refactoring however is a cool area. I think it's Together-powered, if I'm not mistaken. So I'm not campaigning for anything to be removed, but I wonder, now, what's the future of stuff that Borland owns, now that Codegear is on its own :-) Warren
VIEWS ON THIS POST

89

Posted on:

Tuesday 2nd October 2012
View Replies!

Examples of Directory Services access

I'd like to know if anyone could assist me with some code examples to query Directory Services for a user. At the simplist level, I've been asked to provide an ability to perform a search for a user based on someone entering in first/last names. The search would need to return the user's network account id, phone number, email address (informational stuff). On the same line, if the person using my app already knows a persons network account id, then the search would return the full name/phone, etc. So, in the end, I would be querying DS on various criteria. I'm trying to put something together on short order, so I'd appreciate any assistance. John
VIEWS ON THIS POST

124

Posted on:

Tuesday 2nd October 2012
View Replies!

Direct printing to a Epson TM88

I have Witten a Point of Sale program for my company. I do all my reciept printing with direct port commands: Example: Assignfile(ft, 'LPT1'); rewrite(ft); writeln(ft, lineout); Now I must do signature capture. I have no trouble getting the signature from a Verifone, and saving it as Sign.bmp. My problem is how to size for the 40 column printer, as well as printing on a TM88iii printer from Delphi.
VIEWS ON THIS POST

128

Posted on:

Tuesday 2nd October 2012
View Replies!

is it possible to detect lock conflict before it happened

, is it possible to detect lock conflict (Interbase) before it happened \t I write code that updates 3 tables based on user action and may be a lock conflict occur after updating table 1 and stop at table 2 and 3 I know this could be done by using cachedupdates but is there another way for example before call delete or post method I check if a lock conflict will occur \t
VIEWS ON THIS POST

97

Posted on:

Tuesday 2nd October 2012
View Replies!

Clear Breakpoints

When I'm debugging an application I'm setting breakpoints though out and was wondering if there was to clear breakpoints in a project The only way I've been able to clear the breakpoints is one at a time. Anyone Rich
VIEWS ON THIS POST

40

Posted on:

Tuesday 2nd October 2012
View Replies!

To better interact with the posters around here.

I have lately been helping a guy who has a manic-depressive (a.k.a. bipolar) problem. He gets depressed and angry when criticized; takes suggestions well; likes to be listened to; and loves praise. I think that this experience might help me with my responses to posters in these groups. --JohnH
VIEWS ON THIS POST

174

Posted on:

Wednesday 3rd October 2012
View Replies!

function return array

, is it possible to write a function that return array of variant \t
VIEWS ON THIS POST

143

Posted on:

Wednesday 3rd October 2012
View Replies!

Codegear should really read this

Well, Delphi should/could fulfil a few wishes here - the question is - will the influencers step up to the challenge: http://tech.slashdot.org/article.pl.../05/05/2335252 Why do they not read Slashdot A readership of supposedly 30+ million ... Again, a total disregard for marketing - and yes, before anybody says anything, we can all help. Besters Jon
VIEWS ON THIS POST

73

Posted on:

Wednesday 3rd October 2012
View Replies!

Online registration?

Given the fact that Embarcadero doesn't own the "borland.com" domain, what'll happen to online activation of older Delphi versions -- Arthur Hoornweg (In order to reply per e-mail, please just remove the ".net" from my e-mail address. Leave the rest of the address intact including the "antispam" part. I had to take this measure to counteract unsollicited mail.)
VIEWS ON THIS POST

93

Posted on:

Wednesday 3rd October 2012
View Replies!

fortress

> "Fortress is doing for Fortran what Java did for C/C++." > -- Guy Steele Can anyone help me understand this I don't see enough relationship between Java and C++ to understand the connection.
VIEWS ON THIS POST

93

Posted on:

Wednesday 3rd October 2012
View Replies!

Interesting Borland-CodeGear side note in article about Embarcadero from last december

http://www.onstrategies.com/CURRENT-...to-Basics.html This looks promising. At least, they won't try some stupid ideas with CG, since they already tried for themselfs.
VIEWS ON THIS POST

109

Posted on:

Wednesday 3rd October 2012
View Replies!

Multi-dimensional arrays: static dimensions, rectangular versus jagged types, component aliasing

Hi I am a frequent user of multi-dimensional arrays. They are a great data structure, but there is still scope for improvement! Below I list some deable features that are not AFAIK available in Delphi 7. Perhaps some or all these features are already available in later versions of Delphi. Can anyone advise 1. ocation and resizing of multi-dimensional dynamic arrays containing some static dimensions. The SetLength method for allocating or re-dimensioning a dynamic array leaves something to be deed, because not sufficiently general to handle arrays containing some static dimensions. Consider the following type definitions: type TMyRecord= record Value: integer; {...} end; TDynamicArray1D= array {DimensionSize0} of TMyRecord; TDynamicArray2DA= array {DimensionSize1} of TDynamicArray1D; TDynamicArray3DA= array {DimensionSize2} of TDynamicArray2DA; TDynamicArray2DB= array {[{DimensionSize1=}2} of TDynamicArray1D; {*Static* array type} TDynamicArray3DB= array {DimensionSize2} of TDynamicArray2DB; var DynamicArray3DA: TDynamicArray3DA; DynamicArray3DB: TDynamicArray3DB; begin SetLength(DynamicArray3DA, 10, 6, 3); {This succeeds} SetLength(DynamicArray3DB, 10, 2, 3); {This fails} ... end; Array type TDynamicArray3DA, whose dimensions are all dynamic, can be allocated with a single SetLength call. On the other hand, array type TDynamicArray3DB, which contains a static dimension at level 1, cannot be allocated by a single call to SetLength. One has to write SetLength(DynamicArray3DB, 10); for i:= 0 to 9 do for j:= 0 to 2 do SetLength(DynamicArray3DB[i, j], 3); What we need is another dynamic array allocation method having syntax along the following lines: SizeArray(var DynamicArray, DimensionSizeArray]; where DimensionSizeArray= '[' DimensionSize {',' DimensionSize} ']'; DimensionSize= DynamicDimensionSize | StaticDimensionSize; DynamicDimensionSize= IntegerExpression; StaticDimensionSize= 'S' | ' ' An integer expression is provided for each dynamic dimension, whilst the character 'S' or ' ' is provided for each static dimension. Thus the sizing statement for the above array could be written SizeArray(DynamicArray3DB, [10, S, 3]); {S stands for 'Static dimension'} or SizeArray(DynamicArray3DB, [10, , 3]); 2. Differentiation between rectangular and jagged arrays. C# differentiates between rectangular and jagged arrays. Delphi D7 doesn't, as far as I am aware. It would be deable to support both cases and if necessary extend the SizeArray method to handle both cases. 3. Extending the "with" statement to alias array component references. To avoid unnecessary repeated multiple subscripting it would be deable to have an extended 'with' syntax along the following lines: for i:= 0 to High(DynamicArray3DB) do with DI as DynamicArray3DB[i] do {DI is an alias for DynamicArray3DB[i]} begin SI:= i*100; for j:= 0 to High(DI) do with DIJ as DI[j] do begin SIJ:= SI + j*10; for k:= 0 to High(DIJ) do begin with DIJ[k] do begin {.}Value:= SIJ + k; end; end; end; end; If only reading array component values, one can avoid unnecessary multiple subscripting by using separate variables pointing to dynamic arrays as follows: var DynamicArray3DA: TDynamicArray3DA; DI: TDynamicArray2DA; DIJ: TDynamicArray1D; begin SetSizeArray(DynamicArray3DA, [10, 5, 3]); for i:= 0 to High(DynamicArray3DA) do begin DI:= DynamicArray3DA[i] ; SI:= i*100; for j:= 0 to High(DI) do {etc.} This approach cannot be used efficiently when writing array component values, because of Delphi's copy on modify policy. For writing one has to use: for i:= 0 to High(DynamicArray3DB) do with DI as DynamicArray3DB[i] do {DI is an alias for DynamicArray3DB[i]} begin SI:= i*100; for j:= 0 to High(DI) do begin DIJ:= DI[j]; SIJ:= SI + j*10; for k:= 0 to High(DIJ) do begin with DIJ[k] do begin {.}Value:= SIJ + k; end; end; DI[j]:= DIJ; {Must copy modified array back to parent array component!} end; end;
VIEWS ON THIS POST

293

Posted on:

Wednesday 3rd October 2012
View Replies!