Re: [DUG]: Dynamic Arrays V Strings Lists

2001-11-01 Thread Neven MacEwan
David Can you give more info 1/ How are you accessing the info, by position or indexed (and how many ways, and by what type of keys, string, integer etc) 2/ Is the data static or dynamic (ie can you stream the data in and then sort it or is it constantly updated) 5/ Are the records fixed

RE: [DUG]: Dynamic Arrays V Strings Lists

2001-11-01 Thread Chris Reynolds
Maybe. A 'file of record' with an in-memory hash or nary-tree index will get you there in one disk access and not significantly more than 19 key comparisons. This may be a lot better than an enormous in-memory structure and the vagarities of the virtual memory system (unless of course, you pin it

Re: [DUG]: Dynamic Arrays V Strings Lists

2001-11-01 Thread Neven MacEwan
Chris I don't think you read the original post correctly David was requiring a 'microseconds' response, pretty much rules out any disk access Neven - Original Message - From: Chris Reynolds [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday,

RE: [DUG]: DLL's - Sending feedback....

2001-11-01 Thread Paul Grimstrup
I just created an application using the info you supplied, and it worked ok.Are TEMailInfo, TExportInfo and TSQLServerInfo classes or records? In order to formulate the message, does the DLL use properties from these objects/records? -Original Message-From: [EMAIL PROTECTED]

RE: [DUG]: Dynamic Arrays V Strings Lists

2001-11-01 Thread Myles Penlington
Actually thinking about this his biggest problem may actually be NT/Win2000 scheduling, and will need to change the priority of the thread/process to real-time/highest priority if/when required, as a scheduling switch will in all cases take much longer than finding the item. PS: From reading the

RE: [DUG]: DLL's - Sending feedback....

2001-11-01 Thread Donovan J. Edye
P, I just created an application using the info you supplied Console or windows app? TEMailInfo, TExportInfo and TSQLServerInfo They are records type TEmailInfo = record EmailNotification : boolean; SMTPSvr : PChar; PeopleToNotify : array of PChar; end; TExportInfo = record

Re: [DUG]: Dynamic Arrays V Strings Lists

2001-11-01 Thread Neven MacEwan
Myles Are you assuming windows? could be a kylix question! Neven - Original Message - From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, November 02, 2001 10:17 AM Subject: RE: [DUG]: Dynamic Arrays V Strings Lists Actually

RE: [DUG]: Dynamic Arrays V Strings Lists

2001-11-01 Thread Myles Penlington
True. Good point. (Forgot about kylix ...) -Original Message- From: Neven MacEwan [mailto:[EMAIL PROTECTED]] Sent: Friday, 2 November 2001 10:36 a.m. To: Multiple recipients of list delphi Subject: Re: [DUG]: Dynamic Arrays V Strings Lists Myles Are you assuming windows? could be a

RE: [DUG]: Dynamic Arrays V Strings Lists

2001-11-01 Thread Chris Reynolds
Whoops. Probably has to be long-int hash keys pinned into memory then. Is the timing requirements for a very small maximum time (ie real-time control) or a very small average time (ie AI pattern matching) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of

RE: [DUG]: DLL's - Sending feedback....

2001-11-01 Thread Paul Grimstrup
DLL use properties from these objects/records?Yes when it starts up it does use some of the properties of these records, but later on the messsages are just hard coded strings. I am seeing failure when the properties are being accessed.

RE: [DUG]: DLL's - Sending feedback....

2001-11-01 Thread Paul Grimstrup
whoops, just found out that Ctrl+Enter in Outlook is Send... ;-) D. The only way i could get the DLL to fail was to use the Format() function on nil PChar pointers. It worked fine if the PChar pointed to an empty buffer (array[0..x] of char with#0 characters), or even a PChar(aString)

RE: [DUG]: TStoredProc execution problem

2001-11-01 Thread Manning, John
...I'm using Oracle 8i Unfortunately I don't have any experience with Oracle. I have heard stories about problems with the BDE/Oracle combination but haven't really paid any attention to them. Maybe one of the newgroup archives might turn something up? If the BDE, does the stored proc work

[DUG]: Sending BDE dataset to Access Database

2001-11-01 Thread Mark Howard
Hi I apologise in advance if this question demonstrates a fundamental lack of understanding of Delphi! I have a potential site that has a lot of in house written reports based on an Access database. My app is a potential replacement for their existing front end data capture. It is

RE: [DUG]: Sending BDE dataset to Access Database

2001-11-01 Thread Steve Galyer
Hi Mark I have done exactly this when migrating from Paradox to Access - no problems encountered. Regards Steve Galyer -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mark HowardSent: Friday, 2 November 2001 12:23 p.m.To: Multiple

[DUG]: Best practice - To except or not

2001-11-01 Thread Neven MacEwan
Hi all If you are following a trail of properties, ie Datasource.DataSet.Connection is it be to test for assignment/nil a each step or just try except it? ie if (Datasource nil) and (Datasource.DataSet nil) and (Datasource.DataSet.Connection nil) then Result :=

RE: [DUG]: Delphi 6 - Components Book....

2001-11-01 Thread Myles Penlington
I believe Ray has an updated version of his book available on his web site, but only as a PDF that you buy. -Original Message-From: Donovan J. Edye [mailto:[EMAIL PROTECTED]]Sent: Friday, 2 November 2001 1:21 p.m.To: Multiple recipients of list delphiSubject: [DUG]: Delphi

[DUG]: .Res file.

2001-11-01 Thread David O'Brien
Is there any way of reading the contents of a .res file. I'm wanting to get the project version information without needing the compiled exe. Ta, Dave. Attention: This e-mail is privileged and confidential. If you are not the intended recipient please delete the message and notify the

RE: [DUG]: Delphi 6 - Components Book....

2001-11-01 Thread Manning, John
Unfortunately, it's still the Delphi 3 book John -Original Message-From: Myles Penlington [mailto:[EMAIL PROTECTED]]Sent: Friday, 2 November 2001 11:47 amTo: Multiple recipients of list delphiSubject: RE: [DUG]: Delphi 6 - Components Book I believe Ray has an updated version

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Paul Heinz
Neven asked: If you are following a trail of properties, ie Datasource.DataSet.Connection is it be to test for assignment/nil a each step or just try except it? ie if (Datasource nil) and (Datasource.DataSet nil) and (Datasource.DataSet.Connection nil) then Result :=

Re: [DUG]: Best practice - To except or not

2001-11-01 Thread Sandeep
This is better if Assigned (Datasource.DataSet.Connection) then Result := Datasource.DataSet.Connection; Hi all If you are following a trail of properties, ie Datasource.DataSet.Connection is it be to test for assignment/nil a each step or just try except it? ie if (Datasource

Re: [DUG]: Best practice - To except or not

2001-11-01 Thread David Brennan
Neven, I agree with Paul but I have to say that even from a stylistic point of view it isn't simply a matter of personal preference. IMHO stylistically speaking any piece of code which deliberately causes an access violation (even a handled one) has got to be bad! Not to mention the fact the

Re: [DUG]: Best practice - To except or not

2001-11-01 Thread Nello Sestini
This is better if Assigned (Datasource.DataSet.Connection) then Result := Datasource.DataSet.Connection; if Datasource.Dataset is nil won't this raise an exception? -ns http://www.roserox.co.th --- New

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Paul Heinz
Sandeep wrote: This is better if Assigned (Datasource.DataSet.Connection) then Result := Datasource.DataSet.Connection; I don't believe Assigned chases down all possible nils derefs, just the last one. If it does, it's news to me and not documented anywhere I can see. It would indeed

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Manning, John
Won't this crash if DataSet = nil? In that case the compiler won't be able to check if Connection is assigned or not. -Original Message- From: Sandeep [mailto:[EMAIL PROTECTED]] Sent: Friday, 2 November 2001 12:19 pm To: Multiple recipients of list delphi Subject: Re: [DUG]: Best

Re: [DUG]: Best practice - To except or not

2001-11-01 Thread Sandeep
On 2 Nov 2001, at 8:28, Nello Sestini wrote: This is better if Assigned (Datasource.DataSet.Connection) then Result := Datasource.DataSet.Connection; if Datasource.Dataset is nil won't this raise an exception? Yes It does raises an exception (sorry about the last email, I

Re: [DUG]: Sending BDE dataset to Access Database

2001-11-01 Thread Mark Howard
OK I understand that I would have to buy the ADO components from Borland (using D5 Pro) And that the target machine has to have MS ADO 2.1 or greater? Anyone have any idea of the costs of these? Mark - Original Message - From: Steve Galyer To: Multiple recipients of

RE: [DUG]: TStoredProc execution problem

2001-11-01 Thread Sergei Stenkov
G'day all, Got the solution to my problem ... finally. ...I'm using Oracle 8i I have heard stories about problems with the BDE/Oracle combination ... Exactly! One would expect Boolean parameters to work normally, I mean normally ... which wasn't the case ?!?! Apparently,

Re: [DUG]: Sending BDE dataset to Access Database

2001-11-01 Thread Nic Wise
ADOExpress was about $350-500 I think - dunno if we have it or can get it Delphi 6 Pro has the ADO stuff in it tho, so an upgrade might be a better option? Nic. - Original Message - From: Mark Howard [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent:

RE: [DUG]: Sending BDE dataset to Access Database

2001-11-01 Thread Patrick Dunford
ADO components are made by a lot of companies. Over here is a good place to look: http://www.kylecordes.com/bag/index.html If you are really keen you could write a lot of OLE calls to ADO. It pays to do this as early binding for speed. = Patrick Dunford,

Re: [DUG]: Best practice - To except or not

2001-11-01 Thread Neven MacEwan
Paul Thanks for the help, It would be great it assigned() worked wouldn't it Maybe there is a suggestion for borland in there This leads to another question, is 'assigned()' pref to ' nil'?, is pred(count) better thasn Count-1? Actually thats inc(1) questions, or was that 1+1 questions It

RE: [DUG]: DLL's - Sending feedback....

2001-11-01 Thread Donovan J. Edye
P, whoops, just found out that Ctrl+Enter in Outlook is Send... ;-)So is ALT-S as far as I can recall. Anyway *grumble* Seeing as though you had success I perservered, and now have std out and callback working without any problems. AFAIK I did not change things, except for re-organising

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Myles Penlington
Take your pick. Paul is quite right in this statement. The overhead in setting up and taking down exception frames is reasonably light (something equivalent to about 4 assignments), however the overhead in raising an exception (and the OS raising an AV) is huge by comparison. Depends on the

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Myles Penlington
Assigned() generates identical code to nil, and not Assigned() generates identical code to = nil. So take your pick. Myself - I prefer to use Assigned() - treat it as an inlined compiler function - same applies to Pred(), Succ(), Inc() and Dec(). What really gets to me with Succ() and Pred()

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Paul Ritchie
At the risk of not appearing to not enter into the spirit of the discussion ;) aren't you talking about a database application? Therefore the number of clock cycles you can save by coding a certain way over another is more than swamped by relatively slow database operations. Therefore I'd err

Re: [DUG]: Best practice - To except or not

2001-11-01 Thread Neven MacEwan
Myles You've obviously got to much spare time, So I'll ask another one I'm continously amazed how delphi code uses methods repeatedly, there must be some reason especially for assigned checks like if Query.FindField('col1') nil then Query.FindField('col1').AsString := 'blah' not var

Re: [DUG]: Best practice - To except or not

2001-11-01 Thread Neven MacEwan
Paul That was just the property heirachy that popped into my mind Neven - Original Message - From: Paul Ritchie [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Friday, November 02, 2001 3:36 PM Subject: RE: [DUG]: Best practice - To except or not At

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Myles Penlington
I looked at the more general case than just a DB application. It still depends on how often the code is executed, or what the important path is. To me if you wrapped the code with a try except block, I would by default treat this as a I never expect this condition to occur in normal operations.

RE: [DUG]: Best practice - To except or not

2001-11-01 Thread Myles Penlington
Nah, I just get curious and it pays to know your tools. Why all the questions - are you having a slow day? As for debugging - breakpoints etc do support groups so you can turn on/off sets of breakpoints. However with regard to exceptions, I use them a lot and quite often have as many exception

[DUG]: TPicture and its stored data.

2001-11-01 Thread Stacey Verner
I just found out that a TPicture always stores its data as a bmp. I create an Image and save it as a nice small JPG (80 K), and then load it into a TPicture on a Delphi form (lets say, a Splash screen) and suddenly the DFM is 1.3 meg, and the resulting exe is 1.7 meg. Is there any way to

Re:[DUG]: TPicture and its stored data.

2001-11-01 Thread paul . mckenzie
Can you load the image at runtime - in the FormCreate... Regards Paul McKenzie = Paul McKenzie Jetbet II Developer = [EMAIL PROTECTED] Ph: (04) 576-6822 T.A.B. National Office 106-110 Jackson Street Petone New Zealand Reply

RE: [DUG]: TPicture and its stored data.

2001-11-01 Thread Myles Penlington
Yep, Any file can be included as a resource and then loaded from a TResourceStream. Myles. -Original Message-From: Stacey Verner [mailto:[EMAIL PROTECTED]]Sent: Friday, 2 November 2001 3:59 p.m.To: Multiple recipients of list delphiSubject: [DUG]: TPicture and its stored

[DUG]: String -- PChar problems....

2001-11-01 Thread Donovan J. Edye
G'Day, See code below. Can anyone tell me why I am getting rubbish characters (some of the time) in the result returned by Parse_CmdLine() Obviously a pointer is getting screwed up somewhere with the PChar conversions, so what is the correct way for me to place the string sParam value in the

RE: [DUG]: String -- PChar problems....

2001-11-01 Thread Jeremy Coulter
dont pchars need to be null teminated ?? i.e pChar(mypchar+#0) ?? This might be the problem.. Jeremy -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Donovan J. EdyeSent: Friday, 2 November 2001 18:58To: Multiple recipients of list