April 10, 1998

Local SQL

Question: In Delphi 1 I am trying to emulate the “..” function for wild card search in Paradox in Local SQL. I am aware of ‘like’ but it is not specific enough and tends to give something with everything in!Many thanks Simon Answer: LIKE syntax is as follows: WHERE (

Using Output parameter with TQuery

Question: In a TQuery component, I use the SQL property to call up a stored procedure which is kept on a MSSQL server. The string used is ‘Execute [nameofproc] :param1, :param2, etc. However I am trying to return a value from the stored proc using an ‘OUTPUT’ parameter. How can

MsSql v6.5; big result sets and disconnects

Question: I have an app that runs on IB 4 & 5; Oracle v7.x workgroup server, and MsSql v6.5. With SQL Server, when we open a TQuery that produces a result set of more than 100 or so rows; if I don’t do a TQuery.Last, or Open, or Close within

API functions

Question: I want to ask you how can I run windows applications inside of Delphi applications (for example notepad.exe)? Answer: It’s actually even simpler than that… Look in the tips section and find an article with “CreateProcess” in the title. It’ll show you how to launch another Windows application from

Telling your program about modifications

Question: An ordinary Stringgrid with 5 columns and 7 rowsThe user wants to add 1 or 2 more rows. So farI know how to write the code! But where do I putthe code so it knows that there are 1 or 2 or evenmore new rows added? Where do I

Converting strings to reals

Question: I am trying to read in a value of pi/4 from an editbox. Is there a built in command to convert it to a real from a string or do I have to write an entire function?Thanx. Answer: For this, you could simply try StrToFloat, which is a string

Copying a file for source to target in Delphi

Question: How to I copy a file from a source to a target in Delphi. I have been trying: SourceId := OpenFile(Source, FileStructure1, of_Read); if SourceID = -1 then ShowMessage(‘Unable to open source file ‘ + Source); DestId := OpenFile(Dest, FileStructure2, of_Create); if SourceID = -1 then ShowMessage(‘Unable to open

Why does my program continually corrupt an index?

Question: I noticed a couple of people asking for help on this. Could you please tell me why my program might continually corrupt an index? I find that when I am going about entering information into the table, I exit the application and come back in I always get this

Beware of throwing exceptions from a destructor

The most plausible way to report a failure during object construction is by throwing an exception. However, this is not recommended for destructors. The problem is that a destructor may be invoked automatically when an uncaught exception is thrown in its scope. If the called destructor invoked due to an