September 5, 2000

SQL Selection from Visual Basic 6.0

Question: I’m trying to install a search facility on a database program I have written using VB6 and an Access database. I’ve opened by inserting a data control onto my form and linking it to my database, and appropriate table. This gets all the data from the table fine. How

Function’s Return Value

Question: I’d like to know how can I make a return of a function’s local variable (for example, a reference to it) not using pointers technique? Answer: You have tow options: either return the local vriable by value or make it a local static variable and return a reference to

Keyword ‘huge’

Question: I am getting a compile error ‘huge’ obsolete keyword. I am converting a process from Visual C++ 2.0 to 6.0. What keyword could I use in place of ‘huge’? Answer: ‘huge’ was a 16-bit kludge that disappeared (good riddance!) with the transition to 32-bit, about a decade ago. You

Calling a Procedure with a Variable

Question: How can I dynamically build a procedure call string and then get it to execute? Ex. Dim action as String action = “proc(param1,param2)” call action I know this does not work. Is there a way to do this that will work? Answer: Unfortunately, there’s not a function to do

Uses of Reserved Word Operator

Question: In MFC, what does the following declaration do? CPen::operator HPEN() const; My understanding of the operator keyword is that you cannot use it to create a new operator; however, this statement seems to declare HPEN() as an operator member of the CPen class. Answer: Not exactly. The word ‘operator’