Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: mhdhallak on July 12, 2006, 07:18:30 am

Title: Need to run an SQL UPDATE against .EAP
Post by: mhdhallak 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.
Title: Re: Need to run an SQL UPDATE against .EAP
Post by: thomaskilian 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).
Title: Re: Need to run an SQL UPDATE against .EAP
Post by: sargasso 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!!!
Title: Re: Need to run an SQL UPDATE against .EAP
Post by: AshK 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.
Title: Re: Need to run an SQL UPDATE against .EAP
Post by: KP 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.