Accessing BOs from a Console App.


Author
Message
Charles Blake
Charles Blake
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 88
We have developed a StrataFrame application and have created and tested some code that does file moves and table updates.  At this point it makes more sense to move some of these methods to a console application that can be called from a cron type service to be run at specific intervals.  Since these classes don’t use forms or invoke message boxes it would appear that we could easily port this code to a console application.


My question is can I access and use my StrataFrame BOs from the console application; most of the startup code that I see is for Win Forms?



Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
It is if you haven't set the DataSourceKey property to another value on the BO itself.  The DataSourceKey on the BO allows you to have as many different connections as you need and then tell the BO which connection to use through the DataSourceKey.

Also, if this doesn't work, I would like to see the full stack-trace so we can see at what point the error is occurring.  Finally, are you just running this at the moment through a console app or as an actual service?
Charles Blake
Charles Blake
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 88
Thanks, I was able to get connected by using the ConnectionManager and supplying it with the same keys and data we use in the application.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search