Visual Basic 6 application with an Access 2000 dbs.
I need to write code to add two new fields to an existing table in the Access dbs using Visual Basic 6. This code will be sent to all existing customers to run.
I started with code like this:
How do I set the Default Value to "0" for fieldA?
When looking at the table design in Access fieldB has the field size set to "long integer" instead of just "integer". How can I set it to just "integer" using VB?
Thanks for any assistance.
Kim
I need to write code to add two new fields to an existing table in the Access dbs using Visual Basic 6. This code will be sent to all existing customers to run.
I started with code like this:
Code:
Dim conModify As ADODB.Connection
Set conModify = New ADODB.Connection
conModify.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strDBPath
strSQL = "ALTER TABLE AssetA1 ADD fieldA Byte;"
conModify.Execute strSQL
strSQL = "ALTER TABLE AssetA1 ADD fieldB Integer;"
conModify.Execute strSQL
How do I set the Default Value to "0" for fieldA?
When looking at the table design in Access fieldB has the field size set to "long integer" instead of just "integer". How can I set it to just "integer" using VB?
Thanks for any assistance.
Kim