Author Topic: Need to run an SQL UPDATE against .EAP  (Read 4530 times)

mhdhallak

  • EA User
  • **
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Need to run an SQL UPDATE against .EAP
« on: July 12, 2006, 07:18:30 am »
Hi

I need to run an UPDATE statement against my model to update the file path of elements' attachments.

I have my UPDATE statement tested and ready to execute but I don't know how to execute it against my model (.EAP file).



Code: [Select]
UPDATE t_objectfiles SET FileName = 'S:\' + MID(FileName,13) WHERE MID(FileName, 1,1) = 'D'



Where can I execute this statement? I tried the Run Patch command under the Tools menu but it's not working there.
« Last Edit: July 12, 2006, 07:19:34 am by mhdhallak »
Thanks

AL

thomaskilian

  • Guest
Re: Need to run an SQL UPDATE against .EAP
« Reply #1 on: July 12, 2006, 08:05:03 am »
Hmm. Depending on your DB it would be SQL+ or the MS Enterprise Manager or another Query tool. There's also a place in the advanced search of EA where you can execute a SQL (Advanced/New Search/SQL Editor).

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Need to run an SQL UPDATE against .EAP
« Reply #2 on: July 12, 2006, 04:26:17 pm »
 :o :o :o

Quote
There's also a place in the advanced search of EA where you can execute a SQL (Advanced/New Search/SQL Editor).


Why didn't someone tell me about this before!!!


thanks TK!

bruce

>:( >:( >:(  Where's the Help!!!
« Last Edit: July 12, 2006, 04:36:25 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

AshK

  • EA User
  • **
  • Posts: 137
  • Karma: +0/-0
    • View Profile
Re: Need to run an SQL UPDATE against .EAP
« Reply #3 on: July 12, 2006, 04:36:11 pm »
Quote
Hmm. Depending on your DB it would be SQL+ or the MS Enterprise Manager or another Query tool. There's also a place in the advanced search of EA where you can execute a SQL (Advanced/New Search/SQL Editor).


This feature only allows select queries.
The Sparx Team
[email protected]

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Need to run an SQL UPDATE against .EAP
« Reply #4 on: July 12, 2006, 05:16:31 pm »
Quote
I have my UPDATE statement tested and ready to execute but I don't know how to execute it against my model (.EAP file).

An EAP file is an MS Access database with the file extension changed, so you can simply open it in MS Access and perform your update in there.

Of course all the usual caveats apply: you modify the database at your own risk.
The Sparx Team
[email protected]