devxlogo

March 16, 2000

Database Integration

Question: I am developing an application in VB6 that uses its own DB. I need to link my application’s DB with clients’ DBS or even ERP systems. Therefore, I need

Copying Part of a String

Question: I have a little problem which I can’t solve. I will give the question with an example. I’m working with Excel. In a cell the string “100dpi.txt” is written.

Checking If a File is in Use

Question: How can I check to see if a file is in use/open? Answer: An easy way to do this is to attempt to open the file for writing. If

Initializing Array of UDT’s

Question: Here’s some simple code in Test.bas: Public Type MY_RECORD Field1 as String Field1 as StringEnd Typein frmTest.frmGeneral DeclarationsPrivate mArrayOfRecords() as MY_RECORDForm_Load ‘this line of code BOMBS If IsEmpty(mArrayOfRecords) then

Maximum Number of Objects on a Form

Question: Is there any way to get more than 255 objects on a VB form? Answer: No, there’s not a way to pass the limit of 255 objects per form.

Using Format Function to Right Justify

Question: When using printer.print statements to send output directly to the printer, it used to be possible in QB PDS to use something like “printer.print format(number, “###,###.00”) to get right

Using Variables in SQL

Question: I have connected a form to the DB using an ADODC. I connect fine, I can read the DB if I put a literal in my sql: recordsource =

Manually Positioning Buttons in a Java Applet

You can use Java’s layout managers to maintain the relative position of objects in an applet without manually repositioning them as the applet’s size changes. However, you may occasionally want

Where Should Template Definitions Appear?

Normally, you declare functions and classes in a .h file and place their definition in a separate .cpp file. With templates, this practice isn’t really useful because the compiler must