Por madro , Domingo 08 de febrero de 2009 a las 16:57
hola
esperote sea util
suerte
Private Sub Table()
' declaramos
Dim conn As New SqlConnection()
Dim oComm As New SqlCommand()
Try
' creando la cadena de conexion
conn.ConnectionString = "Data Source=.SQLEXPRESS;Initial Catalog=MAconsole;Integrated Security=True"
oComm.Connection = conn
oComm.CommandType = CommandType.Text
' tabla a crear
' te recomiendo que estas se pongan en un texto
'oComm.CommandText=Texta.Text
oComm.CommandText = " create table MAdroTablita(pk int identity(1,1), campo varchar(10)not null )"
conn.Open()
oComm.ExecuteNonQuery()
conn.Close()
MsgBox("ok")
Catch ex As Exception
MsgBox(ex.Message())
conn.Close()
End Try
End Sub