StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Data access through DataBasics questionExpand / Collapse
Author
Message
Posted 06/29/2009 4:08:50 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 01/06/2010 4:11:14 PM
Posts: 37, Visits: 183
I've been playing around with the DataBasics data access trying to get a complex query to return a result set. The ExecuteStoredProcedure method returns an object, which cannot be converted to a DataSet (or can it?). So I can't use that method. The query is complex enough, that I don't feel comfortable using BO's.

The crux of the issue, is that I don't want to put connection strings in my code (one of the main reasons for getting StrataFrame in the first place). I could do that but then I'm making a custom copy of the connection code even though it already exists.

That being said, the other method I was looking at was the GetDataSet method, which requires a SQLCommand variable populated with the connection string. My question is, can I get the connection string from StrataFrame and put it into that variable?

Thanks,
Doug.
Post #23712
Posted 06/29/2009 4:28:31 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Today @ 3:23:20 PM
Posts: 1,704, Visits: 5,138
I believe you can get the connection string via the DataSources collection (assuming you aren't using EnterpriseServer) via:

DataLayer.DataSources("").ConnectionString


Just to make sure I understand though, you are expecting a data set back right? So more than one data table? Some folks more conversant with ADO will have to handle that situation. When I've needed to get multiple data tables back, I've used the static FillMultipleDataTables() command in BusinessLayer. You might have other requirements, like relationships etc., so that might not work for you.
Post #23713
Posted 06/29/2009 4:46:55 PM


StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 01/06/2010 4:11:14 PM
Posts: 37, Visits: 183
Thanks Greg. Exactly what I need. I appreciate it.
Post #23714
Posted 06/29/2009 7:29:57 PM
StrataFrame VIP

StrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIPStrataFrame VIP

Group: StrataFrame Users
Last Login: Today @ 3:23:20 PM
Posts: 1,704, Visits: 5,138
Glad it helped!
Post #23716
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 3:36pm

Powered by InstantForum.NET v4.1.4 © 2010
Execution: 0.094. 7 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.