View Single Post
  #1 (permalink)  
Old January 6th, 2009, 08:15 AM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default Ho can i name the database dynamicly

Hi I need to create a database that takes the name from the textbox so far i have this one
Code:
Dim conn AsNew SqlConnection(ConfigurationManager.ConnectionStrings("test").ConnectionString)
conn.Open()
 
Dim Cmd AsNew SqlCommand("Create Table TestTable(ID Int,Name Varchar(50))", conn)
Cmd.CommandType = CommandType.Text
Cmd.ExecuteNonQuery()
conn.Close()
this will create a table called TestTable i need to change the TextTable Dynamicly depending on woat is in the text box


thanks
__________________
bx