taurus24
03-08-2005, 12:54 AM
Hi, i m trying to create table in my SQL server. but it is not creating table instead it shows this error below. it is suppose to create table base on the stradmin.
Server was unable to process request. --> Line 1: Incorrect syntax near '020700N'.
This is my code:
Public Function SetBlackListInfor(ByVal stradmin As String) As DataSet
Dim ds As New DataSet
setUpDatabase()
sqlCmd.CommandText = "CREATE TABLE '" & stradmin & "'(BAdmin varchar(10) NOT NULL)"
Dim da As New SqlDataAdapter(sqlCmd)
da.Fill(ds)
Return ds
sqlConn.Close()
End Function
Server was unable to process request. --> Line 1: Incorrect syntax near '020700N'.
This is my code:
Public Function SetBlackListInfor(ByVal stradmin As String) As DataSet
Dim ds As New DataSet
setUpDatabase()
sqlCmd.CommandText = "CREATE TABLE '" & stradmin & "'(BAdmin varchar(10) NOT NULL)"
Dim da As New SqlDataAdapter(sqlCmd)
da.Fill(ds)
Return ds
sqlConn.Close()
End Function