VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



While App. is running adds a column to the specified table in the Database using SQL statements.

by Sean Smith (1 Submission)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 20th June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

While App. is running adds a column to the specified table in the Database using SQL statements.

API Declarations


Dim *cmd* As ADODB.Command

Rate While App. is running adds a column to the specified table in the Database using SQL statements.



cnn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; & _ 'For Access 2000
Data Source = *Drive/FolderName/DatabaseFileName*   '* = type in your location
cnn.Open
    
Set cmd = New ADODB.Command
     With cmd
          .ActiveConnection = cnn
          .CommandType = adCmdText
          .CommandText = "ALTER TABLE tblSoftware ADD COLUMN " & _
               txtNewData.Text & " Char(30)"
          .Execute
     End With
    
     cnn.Close
     Set cnn = Nothing
     Set cmd = Nothing
'***********************************************************

Download this snippet    Add to My Saved Code

While App. is running adds a column to the specified table in the Database using SQL statements. Comments

No comments have been posted about While App. is running adds a column to the specified table in the Database using SQL statements.. Why not be the first to post a comment about While App. is running adds a column to the specified table in the Database using SQL statements..

Post your comment

Subject:
Message:
0/1000 characters