Book a Demo

Author Topic: Package.FindObject method  (Read 4109 times)

Tonu

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Package.FindObject method
« on: July 31, 2007, 09:41:09 pm »
Hi,

I have a problem with package.FindObject
It seems to work with constant strings but not with variables. Has anyone experienced similar behavior.

Working code (returns the correct element):

          Set e = package.FindObect("XXX")

Code that should do the same to my understanding

          Dim tmpName as String

          tmpName = "XXX"
          Set e = package.FindObect(tmpName)

I have experimented different types of tmpName (String, Variant, Byte()) but the result is the same -- code returns an error "Can't find matching object" even if the object is there and findobject finds it as far as the argument is constant string.

Best regards
Tonu

PS I am using VB 6.0
« Last Edit: July 31, 2007, 09:41:46 pm by naks »

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Package.FindObject method
« Reply #1 on: August 06, 2007, 09:06:31 pm »
Hello Tonu,
What version of EA are you running and what type of repository are you using?  I have tried this using EA 7.0.815 with an EAP file and did not have any problem with this function under VB 6.0.

Tonu

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: Package.FindObject method
« Reply #2 on: August 07, 2007, 01:31:17 am »
I was using EA professional 6.5.xxx (do not know the exact build)

After having problems I upgraded to 7.0.813, but it did not change the behaviour. I am using the Jet database (jet 3.6 I believe as jet 4.0 checkbox is off in EA settings).

I will try clean install of EA at some point and let you know the results.
« Last Edit: August 07, 2007, 01:31:53 am by naks »

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Package.FindObject method
« Reply #3 on: August 07, 2007, 02:26:38 pm »
If you do have any further problems with this, please send an email to [email protected] with all the relevant details and we can try to look into this further.