Can someone explain why I am getting a parse error on the SQL query in the code below? It runs fine from ISE.
Thanks
$OnLoadFormEvent={
#TODO: Initialize Form Controls here
param ([string]$server = "SERVER",[string]$instance = "DATABASE")
$AutoInstallQry = @"
SELECT v_AdvertisementInfo.ProgramName, v_AdvertisementInfo.AdvertisementID, v_AdvertisementInfo.PackageID, v_AdvertisementInfo.CollectionID,
v_AdvertisementInfo.PackageName, v_AdvertisementInfo.PackageVersion, v_AdvertisementInfo.CollectionName, v_Program.CommandLine,
SUBSTRING (SMSPackages.Source,23,LEN(SMSPackages.Source)-22) as SourceFolder
FROM v_AdvertisementInfo INNER JOIN
v_Program ON v_AdvertisementInfo.PackageID = v_Program.PackageID AND v_AdvertisementInfo.ProgramName = v_Program.ProgramName INNER JOIN
SMSPackages ON v_AdvertisementInfo.PackageID = SMSPackages.PkgID
WHERE (v_AdvertisementInfo.CollectionName = 'All Windows Workstation or Professional Systems') AND (NOT (v_Program.CommandLine LIKE ''))
"@
$connection = new-object system.data.sqlclient.sqlconnection("data Source=$server;Initial Catalog=$instance;Integrated Security=SSPI;
ParserError
ParserError
What version of PrimalForms 2011 do you have installed? Please email zip and email the form file to support@sapien.com. We will take a look at the file to determine the problem. David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
ParserError
I updated to the latest version 2.0.16 this morning before starting the project. The email has been sent.
Thanks
Thanks
ParserError
Found the problem in line 14: The "@ must be at the start of the line. Remove the extra tab and you should be fine.David
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.