| | | StrataFrame 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. |
| | | | 
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")) |
| | | | StrataFrame Beginner
       
Group: Forum Members Last Login: 11/16/2006 1:23:18 PM Posts: 40, Visits: 85 |
| | | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Today @ 6:26:12 PM Posts: 4,901, Visits: 4,887 |
| | | | | StrataFrame 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! |
| | | | StrataFrame Beginner
       
Group: Forum Members Last Login: 11/16/2006 1:23:18 PM Posts: 40, Visits: 85 |
| | Never Mind...found it under SqlDataSourceItem Thanks!
|
| | | | 
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 |
| |
|
|