Change SDO in SDB within a smart window

girlene

New Member
Hi all,

another newbie question from me about smart data object :)

is there any way to change the path of sdo used in created sdb?

when i created a sdb, i was using sdo in folder A, now i have moved my sdo to folder B and recompiled it..
can i change my sdb data source with sdo in folder B?

i've already check the properties and search in website, but there's no clue..
should i re-create my sdb with a new sdo in folder B ?

any help would be appreciated.. thanks..

-lene-
 
You have to do this manually. Open up the SDB in the procedure editor (or a bog-standard text editor) and search for the SDO filename. You should find references along these lines:

DATA-FIELD-DEFS preprocessor
Data Source in the _PROCEDURE-SETTINGS section

Change the path to the SDO here, save, re-open in the AppBuilder, save and compile. Obviously take a backup copy of the SDB file before you try this (but hopefully you've got some source control somewhere)!

However, in these cases I always wonder if you REALLY need a static SDB. Could you use a dynamic SDB instead? Using one would remove the need for an extra file on disk (the SDB), and mean that you could point it at ANY SDO, regardless of pathing, and not worry about issues such as the one you reported.
 

girlene

New Member
thx for reply..

yes, i've already try to edit it manually through procedure editor, but don't know why when i re-open it in application builder, it back to the previous path..

this is not always happened.. there are about 4 to 10 files didn't changed, but the others were succeed to changed.

how to make a dynamic path for sdo?
i'm making sdb through wizard, where i can browse and point the location of my sdo for my sdb data source.

thx b4..

-lene-
 
I don't think this question is about run-time links. The poster has just moved the SDO to a different directory, but objects generated based on the SDO will be using the orginal path.

I've not seen a manual re-pathing of the SDO fail like this before. Perhaps the AppBuilder is "repairing" your change because it can find the SDO in the original location, and that's earlier in the ProPath? That's just a total guess by me though.

On the subject of dynamic SDBs...

I see many new ADM2 developers want to drop a browser on a screen and immediately create a new SDB. If the requirement is only to display the result set of an SDO, with no real "advanced" requirements for the browser (say, complex updatable browser behaviour), then you've just created a new piece of source code that is probably totally unnecessary. You could just re-use the dynamic SDB object, provided to you by Progress with the framework.

I assume you've got a window with an SDO, SDB, maybe a viewer for updating, and the links defined between them to get the screen functioning. All you need to do is:

1. Remove the SDB from the window.
2. Right-click on the SmartDataBrowser button in the AppBuilder Palette.
3. Choose "Dynamic SmartDataBrowser" from the pop-up menu.
4. Click on your window to drop this in.

You have now replaced your static SDB with the dynamic one! It uses all the same links as the static SDB, but has many more instance properties to control standard behaviour. Right-click on the instance in the window to look at Instance Properties and you can control all sorts of stuff. It's a great object.

Using it reduces source code bloating, promotes object re-use, and speeds you up (especially when creating new maintenance screens).

This isn't exactly the answer to your SDO pathing problem, but because the dynamic SDB doesn't have a static SDO path, the problem would go away if you can use it...
 

girlene

New Member
thanks for replies..

i have finally remove my sdb and changed it to a dynamic sdb just like u said.

and it all working well now.

hopefully i don't have to do much effort if there's such things like this happen in the future.

thanks a lot for your help, this is a new experience for my learning progress. :)

-lene-
 
Top