July 20, 1998

Menus & Toolbars for Frame and Sheets

Question: I would like to build two toolbars on the screen. The first is one that goes along the top of the screen that is associated with the menu in the MDI frame. I would also like to build a toolbar along the right-hand side of the current sheet. I

Formatting output

Question: I’m trying to format the output of the select query that I have done. The fields in the database are too large to parse easily, so they need to be minimized. Is there a way to read the field into a smaller space so it prints out less with

Royalty fee

Question: I’d like to know if there’s any royaltyto be paid when I distribute the applications I did in PowerBuilder. Answer: No, you can distribute PB client applications royalty-free. You will need to purchase additional license for server-based applications written using Powerbuilder V6.

Color Dialog (Common Dialog)

Question: How can I use the CHOOSECOLOR WIN32 API with Powerbuilder? Answer: Create a custom user object and declare the following local structure:long lstructsizeulong hwndownerulong hinstancelong rgbresultblob lpcustcolorslong flagslong lcustdatalong lpfnhooklong lptemplatenamethen declare the following instance variables:Private:os_ChooseColor istr_ChooseColorlong il_CustomInitColors[16]blob{64} ibl_CustomColorsDeclare the following local external function:function boolean ChooseColorA( REF os_ChooseColor lpcc

Identity Primary Key column

Question: I have a recurring problem inserting rows into tables that have a column that is “int IDENTITY PRIMARY KEY.” At some point in the life of the table, I get “PRIMARY KEY violation” errors when I try to insert data (of course not specifying an explicit value for the


Question: I am trying to back up a database to a disk backup device over a network. When I attempt my backup, I encounter an error 5 ? Access denied. According to Microsoft, I need to have domain access rights. However, I seem to have full rights on all machines

Embedding single quotes into an SQL text field

Question: Is there any way I can use a single quote in a string and use that string as a value in a text field? Is there an escape character, such as the backslash in Perl? Answer: In SQL Server you can use two single quotes to represent a single

Automating DBCC checks

Question: I need to run DBCC checks on my databases every week, but I was advised not to use the databasewizards in MS SQL 6.5. Can DBCCs be setup to runautomatically? Answer: SQL Server comes with quite a decent scheduler in the SQL Executive. You can use it to schedule