A
aaron
Hi,
I have program below that works fine if I hard code the values in question
but if I try to use variables I get a type mismatch.
If the line reads
Call FirstCOM.CreateUser("MyComputer","myaccount")
it works fine as long as the "MyComputer" is an actual computer.
But if I create a form, type in the two values above, call the asp file I
get a type mismatch. I printout the variables in question to make sure they
contain values and they do.
this call doesn't work where comp_name and usr_account are variables
Call FirstCOM.CreateUser(comp_name,usr_account)
<html>
<body>
<head><title>testing</title></head>
<% language = vbscript %>
<%dim comp_name
dim usr_account
dim FirstCOM
comp_name = request.form("computername")
usr_account = request.form("account")
response.write(comp_name)
%>
<P>computer: <%= comp_name %>
<P>account: <%= usr_account %>
<%Set FirstCOM = Server.CreateObject("ADSI_COM.UsrMgmt")
Call FirstCOM.CreateUser(comp_name,usr_account) '*****TYPE MISMATCH HERE
Response.write "Error " & Err.number & "<BR>"
Response.write "Done!"
%>
</body>
</html>
I have program below that works fine if I hard code the values in question
but if I try to use variables I get a type mismatch.
If the line reads
Call FirstCOM.CreateUser("MyComputer","myaccount")
it works fine as long as the "MyComputer" is an actual computer.
But if I create a form, type in the two values above, call the asp file I
get a type mismatch. I printout the variables in question to make sure they
contain values and they do.
this call doesn't work where comp_name and usr_account are variables
Call FirstCOM.CreateUser(comp_name,usr_account)
<html>
<body>
<head><title>testing</title></head>
<% language = vbscript %>
<%dim comp_name
dim usr_account
dim FirstCOM
comp_name = request.form("computername")
usr_account = request.form("account")
response.write(comp_name)
%>
<P>computer: <%= comp_name %>
<P>account: <%= usr_account %>
<%Set FirstCOM = Server.CreateObject("ADSI_COM.UsrMgmt")
Call FirstCOM.CreateUser(comp_name,usr_account) '*****TYPE MISMATCH HERE
Response.write "Error " & Err.number & "<BR>"
Response.write "Done!"
%>
</body>
</html>