Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using DSN with AccessDatasource

Status
Not open for further replies.

crabback

Technical User
Jan 29, 2007
64
IE
Hi,

I wonder can anyone help me? I have an app that uses an access database, and I've been having issues with updateable queries running on the remote server. I finally found out from the hosting company that this is because I must connect to my database using odbc dsn. I can create the dsn no prob. But now how do I map my AccessDataSource control to the DSN - or do I have to use a different control? and if so, which control should I use?


Crabback
 
Thanks.
Yeah, for part of the site this is fine because it references the connectionstring, but there are a number of pages that use the accessDatasource server control on the page and with that you just search for the .mdb file, there is no where to give the connection string.

I presume there must be another datasource control that looks for a dsn but I don't know what it is.



Crabback
 
there are a number of pages that use the accessDatasource server control on the page and with that you just search for the .mdb file, there is no where to give the connection string
How about the ConnectionString property?



-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Cool! Thanks a million. The connection string property does not exist in the AccessDataSource - but I can use a sqldatasource which does.
You've ended my headache!

Crabback
 
The connection string property does not exist in the AccessDataSource
Err, did you check the link I provided? It's for the ConnectionString property of the AccessDataSource...


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
yeah I did -
"The AccessDataSource control can be used only with the System.Data.OleDb .NET data provider, and the connection string that AccessDataSource uses is specific to this provider. Therefore, the AccessDataSource control exposes connection string settings, such as the DataFile property, as a property and constructs a connection string at run time using the values of the ConnectionString property, if set."
I'm using ODBC. Thanks though.

Crabback
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top