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 Stringt =
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 = sDts.TaskResult = Dts.Results.Success
End Sub
Can anyone point out where my error is Thanks in advance!

VB beginner needs help
Peter Winson
Hi,
Your welcome.
Please mark my 1st post AS ANSWER then....if you wish.
Regards,
S_DS
Pragmented
reichard
Hi,
Try.>>
Dim
t As String Dim s As Stringt =
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
See these url links for more on access sql or mdb database stuff.>>
Use & to join strings not the plus. You can also use a space then the underscore like >> _
to continue a line as i have above.
Regards,
S_DS