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



DataSourceKey Not DefinedExpand / Collapse
Author
Message
Posted 09/28/2006 3:58:56 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 11/16/2006 1:23:18 PM
Posts: 40, Visits: 85

Hi Folks

I have a business object assembly that will provide data to a web site. I have everything wired up but when I run it, I get the following error. Where do I set the DataSourceKey? In the past, I have always put a connection string this in an App or Web Config and gone from there. I am obviously missing something simple.

"MicroFour.StrataFrame.Data.DataLayerException: An error occurred while creating a new DataLayer for the business object. ---> MicroFour.StrataFrame.Data.DataLayerException: The DataSourceKey [] is not defined.

Post #3182
Posted 09/28/2006 4:04:56 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 6:26:12 PM
Posts: 4,901, Visits: 4,887
Yes.  You need to define this in the Application_Start method of the global.asax file.  You will just manually specify the data source:

MicroFour.StrataFrame.Data.Databasics.DataSources.Add(New SqlDbDataSourceItem("","Your connection string"))

Post #3184
Posted 09/28/2006 4:06:35 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 11/16/2006 1:23:18 PM
Posts: 40, Visits: 85
Thanks much!
Post #3185
Posted 09/28/2006 4:08:30 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 6:26:12 PM
Posts: 4,901, Visits: 4,887
Sure.
Post #3187
Posted 09/28/2006 4:13:56 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 11/16/2006 1:23:18 PM
Posts: 40, Visits: 85
ok...dumb question #2...where is the SqlDbDataSourceItem located? I've searched the object viewer, your documetation and the web and come up empty. I also looked for SqlDBDataSource which sounded familiar but no go on that one either.

Thanks!

Post #3188
Posted 09/28/2006 4:17:52 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: Forum Members
Last Login: 11/16/2006 1:23:18 PM
Posts: 40, Visits: 85
Never Mind...found it under SqlDataSourceItem

Thanks!

Post #3189
Posted 09/29/2006 8:05:53 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 6:26:12 PM
Posts: 4,901, Visits: 4,887
Yeah, that's it.  The base class is DbDataSourceItem, so sometimes my brain likes to add the Db in the class name...sorry for the confusion
Post #3195
« 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: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:48pm

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.203. 10 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.