tik4net
tik4net copied to clipboard
how ppp Active Connection remove
I want to remove name from active connection list .
ITikCommand cmd = connection.CreateCommandAndParameters("ppp/active/remove ","name", active.Name); cmd.ExecuteNonQuery();
result is no such command plz, help me
Please help this issues,
how ppp Active Connection remove
Thanks.
Try
ITikCommand cmd = connection.CreateCommandAndParameters("ppp/active/remove ",".id", active.Name);
cmd.ExecuteNonQuery();
If that doesn't work, you will likely need to do a "ppp/active/print","name", active.Name
first, and then use "ppp/active/remove ",".id", id
with the returned ID.
ITikCommand cmd = connection.CreateCommandAndParameters("ppp/active/print","name", active.Name);
string id = cmd.ExecuteScaler(".id");
ITikCommand cmd = connection.CreateCommandAndParameters("ppp/active/remove",".id", id);
cmd.ExecuteNonQuery();