Discussion Locked

Adding Fields to existing Recordset

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have a hidden data control that I am assigning a *.dbf file to. I would like to add fields to the Recordset, but can't seem to be able to use the append property. Short of manually recreating the entire Recordset, does anyone have any ideas or am I missing something?

5 replies

by ke4vtw

I only know of two ways to do what you're wanting. Apparently, you already know that you can create another recordset with the structure you want and manually copy the data into the new recordset. Or, you can use constants in your SELECT to createthe columns you want. For example:

SELECT *, '' as XtraField1, 0 as XtraField2
FROM MyTable

This will give you one empty string column and one empty numeric column. You might have to adjust the constant values to get the columns to the size you wish.

Good luck!

This discussion is closed to new replies.