Re: [DUG]: Paradox SQL - Group totals as % of Grand total

2001-09-25 Thread Mike Osborne
Mark The following works in Database Desktop (v7.0) - haven't verified how it goes in Delphi.   Table has Amount and ExpType (among other things) in an Expenses table. The following SQL provides total expenses by type and as percentage of total and has a grand total at the end.   select "

Re: [DUG]: Paradox SQL - Group totals as % of Grand total

2001-09-25 Thread Trevor Jones
I know this comment is way of the mark in helping you out for this situation,but this sort of problem is why I ditched Quick Reports quite some time ago and switched to using FastReport.    Grouping is where it really stands out..sub-totals are no problem at all - even as percentages.  Its a

RE: [DUG]: Paradox SQL - Group totals as % of Grand total

2001-09-25 Thread Stacey Verner
We have just handled a similar problem here, and here is what we did. Perform your original SQL and put it onto a temporary table (T1). Write another SQL which which sums, totals, counts whatever you want from T1 at whatever grouping level you want and puts it into a new temporary (T2). Now writ

Re: [DUG]: Paradox SQL - Group totals as % of Grand total

2001-09-25 Thread Mark Howard
Craig said > I'm not an SQL expert, but couldn't you first get the grand total as a > variable (unsure whether it would be best to do a preliminary query to > retrieve the single total or sum the total of the column in of your > current resultset - someone may be able to comment here). Yeah, Cr

Re: [DUG]: String Encryption routine

2001-09-25 Thread Phil Scadden
> Um, unless I'm mistaken, this is a pretty basic cypher - are you after You said it! - but that was what he asked for. Definitely not suitable for large amounts of text or where clear text is guessable but certainly enough to put someone off when only a small text is available. I use SHA1 , MD5,

Re: [DUG]: Unicode

2001-09-25 Thread Robert Martin
Yeah I think we might do that. Robert Martin Software Engineer Wild Software Ltd - Original Message - From: "Stacey Verner" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 2:36 PM Subject: RE: [DUG]: Unicode > What abo

RE: [DUG]: String Encryption routine

2001-09-25 Thread Steve Aish
Here's something simple - you enter any string as your input string and it always gives you a six digit number as the return variable. I don't know how easy it would be to break. A colleague and I put it together a couple of years ago. It is only one way... function Crypt(texti : string) : st

Re: [DUG]: String Encryption routine

2001-09-25 Thread Nic Wise
Um, unless I'm mistaken, this is a pretty basic cypher - are you after encrypting something that NEEDS to stay crypted, or just scrambling something so a luser can't get at it? if its the latter, this should be fine, but a cryptographer work his salt should be able to go thru this in about 2 secon

RE: [DUG]: Interesting Delphi 5 compiler bug

2001-09-25 Thread Dennis Chuah
You cannot overload a function based on the function result alone. This because the compiler allows you to call the function without having to assign the result to a variable. Even if it forces you to do so, allowing overloading on function result is difficult at best, eg. if you have one funct

RE: [DUG]: String Encryption routine

2001-09-25 Thread Ross Levis
Hi Phil This looks useful. Can I assume it decrypts as well by passing the Encrypt param as False? Cheers, Ross. Phil Scadden wrote: > here is my favourite, very simple string to hex gobbledegooker. > > Function Encrypt (Src:String; Key:String; Encrypt : Boolean):string; > var >idx

RE: [DUG]: String Encryption routine

2001-09-25 Thread Ross Levis
Phil Scadden wrote: > here is my favourite, very simple string to hex gobbledegooker. > > Function Encrypt (Src:String; Key:String; Encrypt : Boolean):string; > var >idx :integer; >KeyLen :Integer; >KeyPos :Integer; >offset :Integer; >dest:string

RE: [DUG]: Unicode

2001-09-25 Thread vss
Hi again. I also forgot to mention 2 other things. (1). depending on the charactor you are trying to display, i.e if its chinese you will have to set the default charset in the fonts property of the label, AND (2) the other thing is too, that the caption property for the TLabel control is a st

RE: [DUG]: Unicode

2001-09-25 Thread Stacey Verner
What about using an image? Then you don't have to rely on the font being there. Stacey > -Original Message- > From: Robert Martin [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, 26 September 2001 2:25 p.m. > To: Multiple recipients of list delphi > Subject: Re: [DUG]: Unicode > > > Than

Re: [DUG]: Unicode

2001-09-25 Thread vss
HI. Change the font of your label to "Lucida unicode" or "Arial MS Unicode" I have had a lot to do with this problem, and thats teh solution. I needed a Unicode Listview and had to write my own from scratch. try that and see how it goes. Jeremy Couler -Original Message- From: "Robert

RE: [DUG]: Interesting Delphi 5 compiler bug

2001-09-25 Thread Myles Penlington
Thankfully, The method overloading in D6 is much better (eg Strings and WideString method overloads now work). I think the function result is still not checked in D6. Myles. -Original Message- From: Dennis Chuah [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 26 September 2001 1:39 p.m. To:

Re: [DUG]: Unicode

2001-09-25 Thread Robert Martin
Thanks for your help. I decided that if I needed to modify my label component just for one character I would be better looking at alternatives. I found the same symbol in standard wingdings3 so Ive used that in another label beside the existing one. Not elegant but much less effort / time reqd.

RE: [DUG]: Unicode

2001-09-25 Thread Nahum Wild
It depends on what OS you are using. I think that NT4 and Win2k by default support it but earlier versions of windows have to be configured/updated to support it. Nahum. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Robert Martin > Sent: Wednesd

RE: [DUG]: String Encryption routine

2001-09-25 Thread John Christenhusz
Hi Ross, The following code is a simple routine to encrypt and decrypt strings. Simplicity at it's best! (?) Cheers, John. function EnDecrypt(s : string) : string; {Function: Encrypt / Decrypt given string. Entry parameters: s = string to en/decrypt. Return value: En/Decrypted

RE: [DUG]: String Encryption routine

2001-09-25 Thread Wilfred Verkley
One of the strongest and simplest cyphers you can use is RC4 or "ARC-4". It can be implemented in just a few dozen of lines in any programming language or you just find a component to do it. http://www.achtung.com/crypto/rc4.html See http://ciphersaber.gurus.com/ for a really interesting applic

Re: [DUG]: String Encryption routine

2001-09-25 Thread Nic Wise
See Peter's post - its a 1 way hash, very useful for password (ie, you encrypt it, and compare only the encrypted states). I think its part of the Indy component set, from memory, but I'm not sure. Its "standard", and implemented in lots of languages - Delphi and Java for sure N - Origina

Re: [DUG]: String Encryption routine

2001-09-25 Thread Phil Scadden
> I've searched the Net but not found some simple Delphi source to encrypt a > string (based on a given key value). I've only found large component sets > which are an overkill. here is my favourite, very simple string to hex gobbledegooker. Function Encrypt (Src:String; Key:String; Encrypt : B

Re: [DUG]: Unicode

2001-09-25 Thread Robert Martin
Dont think you need to go you? Robert Martin Software Engineer Wild Software Ltd - Original Message - From: "Nahum Wild" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 1:37 PM Subject: RE: [DUG]: Unicode > Is your com

RE: [DUG]: String Encryption routine

2001-09-25 Thread Ross Levis
Nic Wise wrote: > Does it need to be 2 way, or 1 way? MD5 is very good for one-way. Well I was thinking 2-way but I should be able to use 1-way. What or where is MD5? Cheers, Ross. --- New Zealand Delphi Users group

[DUG]: Simple "Encryption"

2001-09-25 Thread Peter Harrison
>I don't need strong encrytion but just something to deter most people from working it out. >Anyone have any suggestions. Maybe I could create something myself but I've not had any >experience in this area. My Site at www.devcentre.org Has a section on Delphi Encryption. What do you need it f

[DUG]: Interesting Delphi 5 compiler bug

2001-09-25 Thread Dennis Chuah
The following compiles with an error in D5. type TSomeObject = class private procedure GetA (msg: TMessage); overload; message 1; function GetA: Integer; overload; public property A: Integer read GetA; end; It seems like D5's compiler is not able to correctly resolve the ove

Re: [DUG]: Unicode

2001-09-25 Thread Allan Vergara
Standard Delphi 4 (i think 5 as well) don't support unicodes. If you want to dispaly unicode you have to create ur own TLabel component by overriding: procedure DoDrawText(var Rect: TRect; Flags: Longint); override; Then on the implementation you should do the following: procedure ...DoDrawTex

RE: [DUG]: Unicode

2001-09-25 Thread Nahum Wild
Is your computer setup to display unicode? Just a quick random thought. Nahum. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Robert Martin > Sent: Wednesday, 26 September 2001 13:30 > To: Multiple recipients of list delphi > Subject: Re: [DUG]:

RE: [DUG]: String Encryption routine

2001-09-25 Thread Patrick Dunford
I use a component called Acrypt which is on the DSP. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Ross Levis > Sent: Wednesday, 26 September 2001 13:31 > To: Multiple recipients of list delphi > Subject: [DUG]: String Encryption routine > > > Fir

[DUG]: Microsoft does JDBC - officially. in sql2000

2001-09-25 Thread Nic Wise
> About time, really :) > > > Hi, > > > > Microsoft allows Java programs to connect to SQL Server 2000. > > > > http://news.cnet.com/news/0-1003-200-7298466.html > > > > > > Test JDBC Driver is available as a free. > > > > http://www.microsoft.com/presspass/Press/2001/Sep01/09-25MerantP

Re: [DUG]: String Encryption routine

2001-09-25 Thread Nic Wise
Does it need to be 2 way, or 1 way? MD5 is very good for one-way. :) N - Original Message - From: "Ross Levis" <[EMAIL PROTECTED]> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]> Sent: Wednesday, September 26, 2001 1:30 PM Subject: [DUG]: String Encryption routine > Fi

Re: [DUG]: Unicode

2001-09-25 Thread Robert Martin
It is supposed to be a solid downwards pointing arrow (as in the ones used in outlook express). The font may need to be set to arial to get the correct result. Although after testing your code on my machine I get a ? mas well. The character map shows the character as U+25BC which I assume mean

[DUG]: String Encryption routine

2001-09-25 Thread Ross Levis
Firstly, thanks to those who helped me find a Help authoring tool. I've searched the Net but not found some simple Delphi source to encrypt a string (based on a given key value). I've only found large component sets which are an overkill. I don't need strong encrytion but just something to dete

Re: [DUG]: Unicode

2001-09-25 Thread Nello Sestini
> I would like to display a unicode character in a TLabel. I tried > Label.Caption := WideStrToString(#9660) but I get a '?' instead of > the character I am after. Ideas? procedure TForm1.Button3Click(Sender: TObject); const w:widestring = #9660; begin label1.caption:='abc'+w+'def

Re: [DUG]: Paradox SQL - Group totals as % of Grand total

2001-09-25 Thread Craig Goodall
Hi Mark, I'm not an SQL expert, but couldn't you first get the grand total as a variable (unsure whether it would be best to do a preliminary query to retrieve the single total or sum the total of the column in of your current resultset - someone may be able to comment here). Could you then use

[DUG]: Unicode

2001-09-25 Thread Robert Martin
I would like to display a unicode character in a TLabel.  I tried Label.Caption := WideStrToString(#9660) but I get a '?' instead of the character I am after.  Ideas?   Robert MartinSoftware EngineerWild Software Ltd

[DUG]: Executing URL

2001-09-25 Thread Patrick Dunford
Using the following code, it works fine on development system but on the system it is installed on, 'Access denied' is returned.   They can click in a hyperlink in a web browser and it works file, however any type of URL passed in the function shown produces the error message.   procedure T

[DUG]: Paradox SQL - Group totals as % of Grand total

2001-09-25 Thread Mark Howard
Hi   Using SQL I want to assemble a dataset (to be used by a Quick Report) that will allow me to express each group total as a percentage of the grand total.    I can't calculate the percentage at the group level in the report because we don't have the total until the end, so it seems that I

RE: [DUG]: Opening file into existing app instance

2001-09-25 Thread vss
wel no. what I am trying to do is, if an ISQL window is already open I just want it to open the SQL file I want to open in another MDI window. Dont think its exaatly flakey. But I am using SendKeys functions now which does the trick...i.e. ALT+F O (file open) Jeremy Coulter -Original Me

RE: [DUG]: Opening file into existing app instance

2001-09-25 Thread Chris Reynolds
Sounds flakey. What are you trying to achieve, batch posting of a SQL file? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of vss Sent: Wednesday, September 26, 2001 9:24 AM To: Multiple recipients of list delphi Subject: [DUG]: Opening file into existing a

[DUG]: Opening file into existing app instance

2001-09-25 Thread vss
Hi all. I have an app. that has as one of it functions the ability to open a .sql file in Sql Servers ISQL application. I can do this fine, BUT how do you go about opening the file into the current instance of the application ? i.e. its already open, and I want the file I need to open, open i