Let me first say I am new to the vbscript environment. I have worked with 6.0 and .NET before, but I am having problems converting to this style.
I am getting the error Type Mismatch error on an IF statement line... What am I doing wrong? Please help
The code:
SQL_STATEMENT = "SELECT COUNT(*) FROM vbscript_test WHERE user_id = '" & _
strUserName & "' AND group_id = '" & strUserGroup & "';"
Set CheckUser = cnMcLDBA.Execute(SQL_STATEMENT)
If CheckUser = 0 Then ****This line has the error
Set Update = cnMcLDBA.Execute("INSERT INTO vbscript_test VALUES('" & _
strUserName & "','" & strUserGroup & "');"
I am getting the error Type Mismatch error on an IF statement line... What am I doing wrong? Please help
The code:
SQL_STATEMENT = "SELECT COUNT(*) FROM vbscript_test WHERE user_id = '" & _
strUserName & "' AND group_id = '" & strUserGroup & "';"
Set CheckUser = cnMcLDBA.Execute(SQL_STATEMENT)
If CheckUser = 0 Then ****This line has the error
Set Update = cnMcLDBA.Execute("INSERT INTO vbscript_test VALUES('" & _
strUserName & "','" & strUserGroup & "');"