dataConfiguration.config not being created

Topics: Data Access Application Block, Enterprise Library Core
Oct 15, 2007 at 12:27 PM
I'm working with an existing 05 solution and the 3.1.0.0 EL config tool. I'm able to open the Web.config with the tool however it is not creating the dataConfiguration.config file (to store the connection string) as a number of articles have lead me to expect.

I've manually created one (both blank and from a sample) but produces an error when opening the Web.config.

Another issue i'm currently facing -though I don't see how it impacts this...one never knows- is that the DbCommand is not being recognized. From one of the DAAB quickstarts:

Dim sqlCommand As String = "Select CustomerID, Name, Address, City, Country, PostalCode " & _
"From Customers"
Dim dbCommand As DbCommand = db.GetSqlStringCommand(sqlCommand)

I'm getting a compiler error at 'DbCommand' as '...is not defined.'

I'm importing:
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.SqlClient
Imports Microsoft.Practices.EnterpriseLibrary.Data.Sql
Imports Microsoft.Practices.EnterpriseLibrary.Data

any help much appreciated.
Oct 24, 2007 at 9:07 PM
You will need to add Imports System.Data.Common to get rid of your compiler error.
As far the dataconfiguration.config goes, it was created for version 1. Not any longer, your database settings will get added in your web.config or app.config file by default.



justSteve wrote:
I'm working with an existing 05 solution and the 3.1.0.0 EL config tool. I'm able to open the Web.config with the tool however it is not creating the dataConfiguration.config file (to store the connection string) as a number of articles have lead me to expect.

I've manually created one (both blank and from a sample) but produces an error when opening the Web.config.

Another issue i'm currently facing -though I don't see how it impacts this...one never knows- is that the DbCommand is not being recognized. From one of the DAAB quickstarts:

Dim sqlCommand As String = "Select CustomerID, Name, Address, City, Country, PostalCode " & _
"From Customers"
Dim dbCommand As DbCommand = db.GetSqlStringCommand(sqlCommand)

I'm getting a compiler error at 'DbCommand' as '...is not defined.'

I'm importing:
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Data
Imports System.Data.SqlClient
Imports Microsoft.Practices.EnterpriseLibrary.Data.Sql
Imports Microsoft.Practices.EnterpriseLibrary.Data

any help much appreciated.