tshm
07-03-02, 22:39
| i'm attempting to delete a table in a database when i program using vb how can i get it? |
View Full Version : how i can delete a table in a database in vb programing? thanks!
| i'm attempting to delete a table in a database when i program using vb how can i get it? |
| _Use this to DROP a table Dim conectar As ADODB.Connection Dim rs As ADODB.Recordset Dim fld As ADODB.Field Dim sql As String Set conectar = New ADODB.Connection conectar.ConnectionString = "Driver={MySQL ODBC 3.51 Driver};" _ & "SERVER=192.168.0.1;" _ & "DATABASE=<database>;" _ & "UID=<whatever_user>;PWD=<password>;OPTION=35" conectar.Open You can use directly--------->>>>>>>>>>> rs.execute "DROP TABLE IF EXIST <table_name>" -----Or you can use dinamic----- sql ="DROP TABLE IF EXIST" & <table_name by a textbox or msgbox or whatever>& " rs.execute sql -------------------------- I hope that this help you... |