Hi,
I try to query to check if record exist. I copied the code that I used in vbscript and tried to modify in javascript. When I run my asp page, I got error message "missing ')'" and it pointed to the statement that I color in red.
Please help.
I try to query to check if record exist. I copied the code that I used in vbscript and tried to modify in javascript. When I run my asp page, I got error message "missing ')'" and it pointed to the statement that I color in red.
Please help.
Code:
<script type="text/javascript" defer>
<!--
function check_input()
{
var objconn = Server.CreateObject("ADODB.Connection")
[COLOR=red]
objconn.Open(DSN=as400DSN, database=172.16.1.10, uid=NO, pwd=XXXX, " ")[/color]
var rsMVAPH = Server.CreateObject("ADODB.Recordset")
var sql = "SELECT phinv# FROM cisdtalib.$mvaph where phinv#='"&strinvnumber&"'"
rsMVAPH.Open(sql, objconn,1,1)
if (not rsMVAPH.eof)
{document.write ("found");
}
else
{document.write("no");
}
document.end
}
-->
</script>