I am checking to see if a record exists in a table, if not I will add a record with values. I am doing this check below to see if it exists and When it does not exist, I get the error msg below:
error msg:
Script Runtime Error: Term 'rstChk.hasNext' does not evaluate to a function.
Code:
var rstChk = db.execute("select ProjectsID,ProjectName,ClientName,AuditYear,ToolName,SQLServer,SQLDBName,SQLTableName FROM tblv_ProjectDetail WHERE ClientName = '" + MyClient + "' AND AuditYear = '" + MyAuditYear + "' AND ProjectName = '" + ProjectName + "' AND ToolName = 'STRATA' and SQLServer = '" + ServerName.getText() + "' AND SQLDBName = '" + DataBaseName.getText() + "' AND SQLTableName = '" + TableName.getText() + "'");
if (rstChk.hasNext())
{
alert("Table ' " + TableName.getText() + "' in " + ServerName.getText() + "/" + DataBaseName.getText() + " already exists in the Project");
return;
}
Kirix Support Forums
Check to see if records exists
1 post
• Page 1 of 1
- abenitez77
- Registered User
- Posts: 143
- Joined: Fri Jan 21, 2011 12:42 pm
1 post
· Page 1 of 1
Return to Strata Help & Feedback