I've never used code like that but it seems to me that you might simply be missing a comma after the first "DateTime".
I have put it in below-

Data1.RecordSource = "PARAMETERS [FROM DATE] DateTime, [TO DATE] DateTime;"