|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
add new fields in database....
hi guys/gals!
is there a way to add new fields in the database(ms access) using VB6? thanks in advance! Peace! |
|
#2
|
|||
|
|||
|
Code:
Dim sStr As String
Dim adoCN As New ADODB.Connection
adoCN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & sFile & ";Persist Security Info=False"
adoCN.Open
sStr = "ALTER TABLE TableName" & _
"Drop Column ColumnName"
adoCN.Execute sStr
sStr = "ALTER TABLE TableName" & _
"Add Column ColumnName DataType"
adoCN.Execute sStr
S-
__________________
If you have found a particular post helpful, show your appreciation by adding reputation points to that user by clicking the "scales" image in the upper right had corner of their post. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > add new fields in database.... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|