|
Group: Forum Members
Posts: 235,
Visits: 309
|
I'm creating a service that needs to access several tables in a database. The service project includes a Strataframe Business Object Library but (obviously) no strataframe application. I have several questions:
1 - is the following correct:
System.Data.SqlClient.SqlConnectionStringBuilder loBuilder = new System.Data.SqlClient.SqlConnectionStringBuilder();
loBuilder.DataSource = _DdmServer;
loBuilder.InitialCatalog = _DdmDatabase;
loBuilder.UserID = _DdmLogin;
loBuilder.Password = _DdmPassword;
SqlDataSourceItem loNewDB;
//-- Create a new data source item
loNewDB = new SqlDataSourceItem(_DdmDatabase, loBuilder.ToString());
//-- Add the new database to the data source collection
DataLayer.DataSources.Add(loNewDB);
2 - How do I make sure that a data layer is created so that the last statement above will acturlaly refer to something?
|