How to use a Connection String in an Access Data Source

S

shapper

Hello,

I have a Connection String defined in my Web.Config:

<connectionStrings>
<add
name = "dbAccess_JaquelineRoxoAtelier"
connectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data
Source = C:\Documents and Settings\Miguel\My Documents\Visual Studio
2005\WebSites\MyWebSite\App_Data\MyWebSite.mdb; User Id=; Password=;"
providerName="System.Data.OleDb" />
</connectionStrings>

And I have an Access Data Source:

Private Sub adsNews_Init(ByVal sender As Object, ByVal e As
System.EventArgs) Handles adsNews.Init

' Define adsNews properties
With adsNews
.SelectParameters.Add("@Culture",
System.Threading.Thread.CurrentThread.CurrentCulture.ToString())
.SelectCommand = "web_News_SELECT_Last10"
.SelectCommandType = SqlDataSourceCommandType.StoredProcedure
End With

End Sub

How do I make my Access Data Source to use that connection string?

Thanks,

Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,696
Latest member
BarbraOLog

Latest Threads

Top