Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to append a field

Status
Not open for further replies.

charlotte49er

Programmer
Nov 17, 2001
25
US
I need to append a field to a dbase file using ado. I'm attempting to accomplish this with the code below but the field is not added and I don't receive any errors. Would someone offer some help/suggestions? Thanks.

Code:
		Set oRS = Server.CreateObject( "ADODB.Recordset" )
ors.Fields.Append "Index", adChar, 255 , adFldIsNullable
 
You are just appending a field to the recordset. To alter any database via ADO, you need an ADODB.Connection and an ADODB.Command to send some database specific ALTER TABLE command to the database.

I assume you use VB and want to add a field to a VFP DBF file?

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top