Last post May 13, 2008 08:53 PM by BGriffin_TPA
Apr 19, 2008 06:31 PM|richth|LINK
I've created a nice interface (web form) for adding a member to a database. This will be posted to an external host server. I'm trying to use the Data Source Configuration Wizard to add a data source. At the Add Connection dialog it asks for Username
& Password to Log on to the database. I'm developing this locally, so am confused as to exactly what it wants here. Thought it needed my local username and pwd, but get the above error. What exactly must I do to eliminate this error while developing locally?
(I have also explicity set NTFS perms to Read & Execute, Read, and Write on the database file and the folder it sits in C:\Inetpub\wwwroot\Prof, for the ASPNET, IUSR & IWAM accounts.) (Overkill, yes, but I'm tired of jumping through all these hoops just to
access a db.) <g>
Thanks for any help/explanations.
Apr 20, 2008 05:05 AM|Mikesdotnetting|LINK
You may well be missing some key information in the connection string (which you haven't shown us) or you may be trying to use an AccessDataSource control (which doesn't like password protected dbs). Set the connecton string in your web.config, and use
a SqlDataSource control.
Connection strings can be found here:
http://www.connectionstrings.com/?carrier=access. Scroll down to OleDbConnection and pick the System Database one that fits your scenario.
Apr 20, 2008 07:08 PM|richth|LINK
Thanks Mike. I may be making some progress here. So, I really don't have to place a connection string in web.config. It's just an alternate method of providing a connection string, correct? Guess my problem is I've never used database controls, but have
been attempting to code connections manually, as I follow examples in various books (older books) I'm using. That threw me off a bit here. Thanks.
Apr 21, 2008 02:33 AM|Mikesdotnetting|LINK
So, I really don't have to place a connection string in web.config. It's just an alternate method of providing a connection string, correct?
No and yes. But. Putting the string in the web.config means that you only have to alter it in one place in the event of any changes, rather than in every page in your site.
Apr 21, 2008 07:50 AM|richth|LINK
Ah. Gotcha. Makes perfect sense there. Thx. I'll work on getting that implemented. [:)]
May 12, 2008 05:13 PM|BGriffin_TPA|LINK
Same error message here..all tables / links / queries work perfectly from inside
Access 2002. When connected by using the app (VB 2008)..same error. I'm out of ideas..[:S]
DB1 p/w = Admin123 DB2 p/w = 345
TB1(link) <=== TB2
App opens DB1 using :
"Provider=Microsoft.Jet.OLEDB.4.0;Database Password=admin123;" & _
"Data Source=C:\Admin.mdb;Jet OLEDB:System Database=System.mdw;" & _
Note that both db's workgroup file points to system.mdw
Thanks for any input... [cool]
May 13, 2008 08:53 PM|BGriffin_TPA|LINK
I found the immediate problem..[:D] you can't use BOTH passwords at the database
level and User level..choose one. In the process of investigating this I see the
property page in the VisStudio2005 database tab. It has all kinds of properties
I've never seen before..mask password?..encrypt password?..[*-)] lots more.
Can those be included in the connect string for those of us who are doing it in code,
as opposed to an AccessDataSouce object on the page? If they could, would they
improve security any? how much? Which ones?
Thanks for any response. [cool]