Author |
Topic |
|
vb2obbm02
Starting Member
15 Posts |
Posted - 16 February 2005 : 06:48:00
|
Hello!
In the SnitzTM Forums 2000 Version 3.4.05 Installation Guide and Readme under the "Setting the Connection String" topic there is a section for setting up a DSN connection.
I did this, config.asp to "strConnString = "Snitz" '## DSN", and setup a system DSN called Snitz, which pointed to the Snitz database in SQL server 2000. The Data Source tested OK.
When trying to access Snitz Forums I get the following:
The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed.
--------------------------------------------------------------------------------
Please try the following:
Click the Refresh button, or try again later.
Open the fc-crserver home page, and then look for links to the information you want. HTTP 500.100 - Internal Server Error - ASP error Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D) [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. /snitz/inc_header.asp, line 111
Browser Type: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.3; .NET CLR 1.1.4322)
Page: GET /snitz/admin_login.asp
Time: Wednesday, February 16, 2005, 3:32:59 AM
More information: Microsoft Support
--------------------------------------------------------------------------------
If in config.asp I use "strConnString = "Provider=SQLOLEDB;Data Source=fc-crserver;database=Snitz;uid=snitz;pwd=snitz;" '## MS SQL Server 6.x/7.x/2000 (OLEDB connection)" it works just fine.
Can someone possibly explain to me why I can't get it working by setting up a DSN?
Any support and information you can provide me with is greatly appreciated.
Thanks! ct
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 February 2005 : 07:50:51
|
You (or someone else for you), will need to reconfigure your server so that it accepts both Windows and SQL Server authentication. Right now it is configured just to accept Windows authentication.
Regardless of that, you should use the SQLOLEDB provider, instead of using a DSN. It's faster and more robust. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
vb2obbm02
Starting Member
15 Posts |
Posted - 16 February 2005 : 14:13:43
|
Rui,
Thanks for responding to my query.
I appreciate you statement that I should use the SQLOLEDB provider as opposed to the DSN.
On your first statement, I would be the one to reconfigure my server. I have System DSNs setup that access the SQL server with SQL Server authentication because I'm choosing SQL Server authetication for my access to SQL Server through the DSN. I use these System DSNs to connect to SQL Server through Microsoft Access and it works.
A couple of things here:
You say the the SQLOLEDB provider is faster and more robust. If so, maybe I should change my Access links to the SQL Server from Systm DSNs to linking with the SQLOLEDB provider. What do you think?
Also, if I've got System DSNs setup that are using SQL Server authentication and that are working, then why isn't the "Snitz" System DSN that I've setup working? Remember, when I setup the DSN, it tests successfully when I test the data source at the end of setting up the System DSN.
I'm assuming that the System DSN is to be setup on the same system whree Snitz Forums is running. Right?
I certainly could use your feedback. Thanks a lot! ct |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 February 2005 : 16:18:40
|
Ok, here goes a couple answers :):
You can't, AFAIK, use DSNs with the SQLOLEDB provider. If you wanted to use an SQLOLEDB provider to access SQL Server from Access you need to use an Access Data Project, instead of a "normal" access app, using linked tables through DSN.
Regarding the use of System DSNs from Access, doesn't Access request you the login and password to connect to the DB? It always ask with me... Probably that's the cause for the problem you're facing, since the user indicated in your error message is 'null'.
I would try the SQLOLEDB provider connection string. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
Edited by - ruirib on 16 February 2005 16:19:42 |
|
|
vb2obbm02
Starting Member
15 Posts |
Posted - 16 February 2005 : 17:00:48
|
Rui,
Wow! I went and figured out that to use an SQLOLEDB provider to access SQL Server from Access I needed to use an ADP, so I created one to try it out. Wholly comolly! What a HUGE speed difference in regards to accessing the data, especially when that data is going accross a wireless network to another location. I didn't realize that there was such a huge difference. I sincerely thank you for alerting me to this (actually I feel pretty dumb that I didn't already know this).
In regards to using the System DSNs, Access does ask you to login with a username and password to the database each time you open access and try to access the specified table that's connected through a DSN. What I've done in this regard, however, is the first time I access a table that asks me to login with username and password, I check the "use trusted connection" checkbox in the login screen. This way it automatically logs in for me in the future without me having to enter the information.
I am using the SQLOLEDB provider connection string with Snitz and am going to start the process of moving over to using ADPs instead of MDBs. DSNs are history as far as I'm concerned.
So, here's another question now that we're on a roll here. We'll two actually.
First, can I sign up somehow for email notification on this forum to get notified when a response is posted?
and
Second, in the SQLOLEDB provider connection string, how do you protect the username and password, moreso the password? Isn't this an issue?
Thanks! ct |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 16 February 2005 : 17:38:02
|
ct,
This forum has subscriptions enabled only for Security Announcements, due to the load subscriptions may impose on a server, if they are widespreadly used and many people subscribe to topics (as it would be the case here, at Snitz). So, you cannot be notified of replies to topics of interests in this forum.
You do not protect username and password in the connection string. Why is it not an issue? No one can download an .asp file, so the only way to get to the contents of such a file would be to get control of the web server. If that happened, you'd need to worry with a lot more than your own db.
Many thousands of people connect to SQL Server from .asp files and they use both SQLOLEDB and ODBC providers with details included in the connection string (including myself). This has not been a problem, from a security point of view, except in an very earlier version of IIS, where a bug permited .asp files downloads.
Anyway, to minimize risks, I would suggest assigning a db role with lesser rights, for the user you plan to specify in your connection string. I would suggest db_datawriter role, but only after running setup.asp first, so that tables can be properly created. dbo role is what I'd recommend to create the database tables when running setup.asp for the first time. |
Snitz 3.4 Readme | Like the support? Support Snitz too |
|
|
vb2obbm02
Starting Member
15 Posts |
Posted - 16 February 2005 : 18:03:56
|
Good answers. I appreciate that. I will incorporate your recommendation into my connection string. |
|
|
|
Topic |
|
|
|