VB beginner needs help

Hello, I'm a very beginner with VB. I have the below code for a script task in an SSIS package, which returns syntax error when I tried to execute.

Dim t As String

Dim s As String

t = CStr(Dts.Variables("TableName").Value)

s = "CREATE TABLE Promohist2.dbo." + t + ""

(

[FirstName] char (10) NULL,

[MiddleName] char (40) NULL,

[LastName] char (40) NULL

)"

Dts.Variables("SQLText").Value = s

Dts.TaskResult = Dts.Results.Success

End Sub

Can anyone point out where my error is Thanks in advance!



Answer this question

VB beginner needs help