M
msch-prv
I have difficulties declaring and using an Access connection string.
The web.config declaration is:
<connectionStrings>
<add name="DbConn"
connectionString="~/App_Data/CRM2K_be.mdb"
providerName="System.Data.OleDb"/>
</connectionStrings>
In the Page_Load event, I have the following:
Dim sqlSrc As SqlDataSource
sqlSrc = New
SqlDataSource(ConfigurationManager.ConnectionStrings("DbConn").ConnectionString,
"SELECT CustLName FROM tblCust")
grd2.DataSource = sqlSrc
grd2.DataBind()
When I run the page, an initialization error pops up: 'Format of the
initialization string does not conform to specification starting at
index 0'
What is the proper syntax (ASP.NET 2.0)? Are there some Access sample
apps to demonstrate these pinciples? Most of the samples rely on SQL
Express.
(Side comment: As a newbie, I find ASP.NET 2.0 really tough to get a
hang on. The MS literature is overwhelming, but not really useful if
you are learning the basics.)
TIA, Mark
The web.config declaration is:
<connectionStrings>
<add name="DbConn"
connectionString="~/App_Data/CRM2K_be.mdb"
providerName="System.Data.OleDb"/>
</connectionStrings>
In the Page_Load event, I have the following:
Dim sqlSrc As SqlDataSource
sqlSrc = New
SqlDataSource(ConfigurationManager.ConnectionStrings("DbConn").ConnectionString,
"SELECT CustLName FROM tblCust")
grd2.DataSource = sqlSrc
grd2.DataBind()
When I run the page, an initialization error pops up: 'Format of the
initialization string does not conform to specification starting at
index 0'
What is the proper syntax (ASP.NET 2.0)? Are there some Access sample
apps to demonstrate these pinciples? Most of the samples rely on SQL
Express.
(Side comment: As a newbie, I find ASP.NET 2.0 really tough to get a
hang on. The MS literature is overwhelming, but not really useful if
you are learning the basics.)
TIA, Mark