June 29, 1999

Resize the Browser On-the-Fly

If your Web page is formatted to look best in a certain size of window, you can try resizing the visitor’s browser using the resizeTo() method. Do this when the page loads. You need to provide the width and length values in pixels. This code resizes the browser to 640

Use Single Quotes to Enclose Character Strings Used in T-SQL Queries

You should use single quotes to enclose character strings within Transact-SQL queries when used with MS SQL Server. The advantage is that your queries will work regardless of the QUOTED_IDENTIFIER setting. If the QUOTED_IDENTIFIER option is set to “ON”, double quotes cannot be used to delimit character strings whose length

Copying char array to integer

Question: I have a char array, for example: char orig_amt [20]. I need to convert this to an int orig_amt so I can do some calculation. Is there a command to change a char array to int? Answer: The standard C library provides the atoi function, which converts an ASCII

WHERE Clause and Query Performance

Question: As a rule of thumb, a query that does a join will run faster if the table with the least number of rows is referenced first in the FROM-clause and if appropriate indicies are created. Under what circumstances can the performance of a query be improved by transposing or

Deleting Listbox Items

Question: How can I delete more than 1 Item from the listbox at once? Answer: I don’t believe the Windows list box allows you to delete more than one item at once unless you are deleting everything.

Software Engineering (C++ a bad choice?)

Question: I am working on an assignment that asks us to determine why using C++ is a bad choice, from a software engineering perspective.So far, I have found that C++ is slow in comparison to other languages, such as PASCAL or VB, and there is no built in Revision Checking

Attach Table

Question: I have 2 databases in SQL7. I need to attach one table, TB1, from DB1 to DB2, to run a join query. My query uses TB1 from DB1 and TB2 from DB2.I open the DB2 with ADO .How can I attach this table?This works in Access. Answer: I think

Command Line Arguments

Question: I have a small console program that requires I pass arguments for it to run specific functions. I want to change the code so it automatically runs a set of command switches but cannot figure out how to do so. If I do argv[0] = “-a -b -c” I

File I/O

Question: How do I read in both a character string and int value from a file? The data I am trying to read looks like this: Name1 10 10 10Name2 10 10 10 Answer: In my opinion, the newer C++ contructs really don’t help much here. The best way I’ve

No more posts to show