I am creating a SilkTest script in which am storing a string in a List of String variable
List of STRING FaultDn
This variable reads the string from a file.
FaultDn = ReadFile("C:\FaultDn.txt")
Then I try to connect to SQL database to retrieve a value by providing this string
HSQL hstmnt = DB_ExecuteSql (hdbc, "select Id from openview.dbo.OV_MS_Message where OriginalServiceId like @FaultDn")
But it returns an error
Error: (42000) [Microsoft][SQL Server Native Client 10.0][SQL Server]Must declare the scalar variable "@FaultDn".
Can you please help in correcting this SQL Query in SilkTest Script?