i want to create a table which takes name as from text box in which there will be employee id.. so that it will create table of employee ID. but wen i give any integer in text box and click create it give me an error.. as "Incorrect Syntax near '4'." here
4 is the value which i entered in the text box. if i pass any string or name.. it creats a table of that string as name with out any error.. but it dose not take integer as name.. plz help am posting m code here..
Private Sub Tab_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tab.Click
If con.State = ConnectionState.Open Then
con = New SqlConnection("Server=SAWANT-PC\SQLEXPRESS;Database=PR;Trusted_Connection=True")
sqlq = "create table " & EmpID.Text & "" + "(myId nvarchar(MAX), myName CHAR(50), myAddress CHAR(255), myBalance FLOAT)"
cmd = New SqlCommand(sqlq, con)
View Complete Post