SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Upgrading Custom Code Snippets

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Upgrading Custom Code Snippets
Author Message
Mark Y



Joined: 01 Oct 2008
Posts: 5
Country: United States

Post Upgrading Custom Code Snippets Reply with quote
Hello,

Is there a way to import custom code snippets created in SQL Assistant 3.0? I backed up the data directory, uninstalled 3.0 and installed the 4.0 Beta. I can see the differences in the old and new SqlAssist.sas.
Wed Oct 01, 2008 5:41 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
Yes, it is surely possible, but not straight-forward. SqlAssist.sas is basically a text file, although some special symbols can be found in the content. So you can open it in Notepad and use simple copy & paste to bring your old code snippets to the new file. The only trick is to find where to paste them because snippet names could be repeating for different assistance types. I suggest to create some dummy snippet with a unique name. then close SQL Assistant, edit the file, find and replace that unique dummy snippet with the snippets from your old file. After you paste them, you may need to adjust snippet numeric ids to make them unique.

Please make a backup of the .SAS file before editing it, so that if something goes wrong, you can rollback to the current config.
Wed Oct 01, 2008 5:54 pm View user's profile Send private message
Mark Y



Joined: 01 Oct 2008
Posts: 5
Country: United States

Post Reply with quote
Thanks for the prompt reply! I've already discovered that I need to renumber the snippets. From the design standpoint, can you reserve a range of numbers, say 1000 and up for custom snippets leaving 1 through 999 for the stock snippets? Or maybe even create a flag so that you'd never overwrite non-standard snippets?
Wed Oct 01, 2008 6:00 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Reply with quote
There is a better way to do that, but at the moment it cannot be used for old files. SQL Assistant supports automatic .SAS file merge feature. At the moment this works for the same version files only, I mean only for merging v3 files from different directories or builds, or for v4 files only. We are still working on making this function work cross-version. I hope it will be accomplished before v4.0 release.

PS. Here is how the merge is implemented. If you rename some SAS file as .SAS.OLD, copy it to the new installation folder, and then restart SQL Assistant, it should automatically merge both old and new SAS files and load all custom settings and additions. Please don't try to do it now because as I stated above this function doesn't yet support merging v3 and v4 files.
Wed Oct 01, 2008 6:15 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.