November 22, 1999

Display and Save a Grahic

Question: I have an application in which I have to enter employee info and save their photo. I can do that if I use a data control and bound control like Picture Box or OLE Control. I would like to do the same thing using DAO, ADO or RDO. Can

Migration: Access to SQL Server

Question: I have written an application using VB6/Access. I use DAO. How easy is it to convert the application from Access to SQL Server? Should I make a lot of changes in the code? Answer: The best way to do this is to use the SQL Server Upsizing Wizard that

Objects And Classes

Question: I need to compare two object instances of the same class. But I need to compare the contents and not the references (ie: “obj1 is obj2” – will not do). Would using CopyMemory work? Answer: There really is not a good way to do this, other than to check

Taking the Null Character Out of a String

Question: Let me describe the problem first: I have a TYPE statement with two variables(appname & dbname). They both are pointing to a global variable that sets the maximum length of each to 8(eight) characters each. I am trying to print the values inside a listbox using ADDITEM and concatenating

Linking a Listbox to a Database

Question: How can I put a column from my database into a listbox using VB 6.0? Answer: Here’s a quick way to load a listbox using ADO in VB 6.0. You’ll have to connect to your database using the appropriate provider?the one shown here is using the Jet 4.0 provider

Combobox and ADO Resultset

Question: After retrieving a resultset, using VB6, from SQL Server, I am easily able to populate a grid by setting the resultset to the grid (i.e. Set DataCombo1.DataSource = GetRs). How can I populate a Combobox with a resultset? I am selecting 1 field from SQL Server and I want

Variant Naming Specification

Question: I know a recordset object should be named rstName, but don’t know all about variant naming specifications. I looked for it on MSDN for a long time, but couldn’t find it. Answer: A common prefix is vnt, but I tend to not use that. When I’m using Variants in

Split Function

Question: How is the data laid out in the array and how do you know the size of the array! Answer: Each string that results from the Split function is placed in its own array element. The way to determine the size of the array is to use the UBound

Object Creation in VB

Question: I’ve read about what happens behind the scenes when VB creates an instance of a COM object. But, what exactly does happen when VB creates an instance of a class that I defined? Is it any different? What about instances of a ‘VB defined’ class (e.g. a Collection)? And

No more posts to show