Book a Demo

Author Topic: Meaningless EA Error Message  (Read 5118 times)

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Meaningless EA Error Message
« on: June 23, 2010, 02:10:10 am »
Hi All

Does anyone out there know the meaning and cause of the following message appearing in an Add-In?

Error:
Code = 0x0
Source - Line : 0; Char : 0;
Error Description = (null)

It is appearing after executing the command

Repository.SqlQuery

The query does in fact return the correct the result, but the error dialog is incredibly annoying and I cannot make it go away! :-[

Cheers

Phil
Models are great!
Correct models are even greater!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Meaningless EA Error Message
« Reply #1 on: June 23, 2010, 05:46:01 am »
What does the query look like, and do you have this issue every time you use SQLQuery?
I know EA doesn't like insert/update/delete statements being passed to SQLQuery, so it might be something like that?

Geert

beginner

  • Guest
Re: Meaningless EA Error Message
« Reply #2 on: June 23, 2010, 04:46:30 pm »
I had this message too, but I can't remember how I got rid of it... Most likely it was me doing something wrong, but what???

b.

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Meaningless EA Error Message
« Reply #3 on: June 23, 2010, 06:19:59 pm »
Thanks Guys for the replies, the situation breifly is:

I am modifying an Add-In for a client that is going to work on shared models, and will be doing fancy things with profiles and tagged values (synchnronising tagged values is just one of them).

They use "require lock for edit", so before updating a list of elements I need to check the lock status, and only work on unlocked or locked for the current user elements.

The discovery of whether locks have been applied is easy and works fine. The problem (the error message) occurs on the following query

queryResult = String.Empty;
queryResult = repository.SQLQuery(@"SELECT * FROM t_secuser " +
                              @"WHERE USERID = '" + userID.InnerText + "'");

Which is taking a userID from the first query XML result and discovering the user name etc

The query above does work and does retrieve the correct results.

For testing I have created a small test EA file which is a shared model, with security enabled. The users  defined are the default admin and another called Phil, who is a member of the Adminstrators group

When running the add-in logged in as Phil, all is fine ... correct results are obtained and no error. However repeating the process logged in as admin, produces the correct results, but the error message occurs when looking up Phil.

Cheers
Models are great!
Correct models are even greater!

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: Meaningless EA Error Message
« Reply #4 on: June 23, 2010, 07:03:19 pm »
Hi Guys

Problem solved, the query was changed to

queryResult = repository.SQLQuery(@"SELECT UserLogin, FirstName, Surname FROM t_secuser " +
                              @"WHERE USERID = '" + userID.InnerText + "'");

That is not using * in the SELECT and all is fine now

Cheers

Phil
Models are great!
Correct models are even greater!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Meaningless EA Error Message
« Reply #5 on: June 23, 2010, 08:11:08 pm »
Phil,

Good you figured it out.
I suspected it might have something to do with the actual query.

Geert