Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error using OraRef Object in VB

Status
Not open for further replies.

zgrande

Programmer
Mar 18, 2002
15
0
0
BR
Hi!
I'm trying to access an object reference in a view in another schema, (connecting using a user that has just the connect attribute), this view is a union of two collections, it has the name and a reference to the address of the vendor and manufacturer, so I use the following code:

dim Address as oraRef
set Recordset = oraDatabase.CreateDynaset("select v.Address from vw_view v where v.name = 'aaa'")
if Recordset.RecordCount>0 then
Recordset.movefirst
set Address = Recordset.Fields("Address").value 'this line code works
'once I try to access an attribute value it generates an error
debug.print Address.Street 'generates an error
debug.print Address.State.Name 'generates an error

The error returned is : ORA-01031, which implies in access privileges, but the user has the execute privilege to all the objects related to the problem. It's strange because if I run the query in the SQLPlus it returns the values (e.g. "select v.Address.Street" or "select v.Address.State.Name").

Can somebody help me?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top