General discussion

Locked

Adding Fields to existing Recordset

By randy.pitcher ·
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?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Adding Fields to existing Recordset

by karlww In reply to Adding Fields to existing ...

Sorry, you can't do it unless you change your SQL and requery.

Collapse -

Adding Fields to existing Recordset

by randy.pitcher In reply to Adding Fields to existing ...

The question was auto-closed by TechRepublic

Collapse -

Adding Fields to existing Recordset

by ke4vtw In reply to Adding Fields to existing ...

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!

Collapse -

Adding Fields to existing Recordset

by randy.pitcher In reply to Adding Fields to existing ...

The question was auto-closed by TechRepublic

Collapse -

Adding Fields to existing Recordset

by randy.pitcher In reply to Adding Fields to existing ...

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Software Forums