plsql - PLS-00306: wrong number or types of arguments in call to 'select_s' -
just calling directly editor (toad). no idea why getting above error having checked function definition , variable types repeatedly. of information available online seems stored procedures - don't believe used here
declare type attrs_type varray(10) of string(10); l_ldap_host varchar(255) := 'servername'; l_ldap_port int := 389; l_ldap_user varchar(255) := 'username'; l_ldap_passwd varchar(255) := 'password'; l_ldap_base varchar(255) := 'l=something,dc=something'; l_session dbms_ldap.session; l_retval number; l_entry varchar(255); l_attrs attrs_type; l_message varchar(255) := null; l_filter varchar(255) := 'objectclass=*'; begin l_session := dbms_ldap.init(hostname => l_ldap_host, portnum => l_ldap_port); l_retval := dbms_ldap.simple_bind_s(ld => l_session, dn => l_ldap_user, passwd => l_ldap_passwd); l_attrs(1) := '*'; -- retrieve attributes l_retval := dbms_ldap.search_s( ld => l_session, base => l_ldap_base, scope => dbms_ldap.scope_subtree, filter => l_filter, attrs => l_attrs, attronly => 0, res => l_message); dbms_output.put_line(l_message); -- code stuff exception when others dbms_output.put_line (sqlerrm); end
you have define l_attrs
dbms_ldap.string_collection
, not own type. if type defined in same way, not interchangeable apparently-similar type. oracle, attrs_type
not same string_collection
. hence error you're getting - indeed using wrong type argument.
a collection type defined in package specification incompatible identically defined local or standalone collection type.
Comments
Post a Comment