Hi,
I’ve used a Connection and Userconnection to execute statement directly, but I got the error, following is the code and error.
server static void main(Args args)
{
Userconnection connection;
Statement st;
Resultset rt;
str sql;
;
sql = " select * from CustTable";
connection = new userconnection();
st = connection.createstatement();
rt = st.executequery(sql);
while(rt.next())
{
print rt.getstring(2);
}
}
Error:
Request for the permission of type ‘SqlStatementExecutePermission’ failed.
(S)\Classes\SqlStatementExecutePermission\demand
(S)\Classes\Statement\executequery
(S)\Classes\Class1\main - line 12
Thanks,
Ambanna Yatnal