View Single Post
  #2 (permalink)  
Old January 6th, 2009, 10:38 AM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Well which do you need to do: create a database or create a table?

In any event you would want to do something like this:

vb Code:
Dim Cmd AsNew SqlCommand("Create Table " & textbox1.Text & " (ID Int,Name Varchar(50))", conn)


Obviously by doing things this way you open yourself up all sorts of SQL Injection attacks so sanitize accordingly.

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
bex (January 6th, 2009)