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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

default database permissions and subsequent connection issues

Status
Not open for further replies.

thesimpsonator

IS-IT--Management
Jul 5, 2007
24
GB
Hi folks,

thought it was something to do with my connection code etc that i was having trouble connecting to the database i have on my site, however think it's more something to do with permissions on the database itself.

to load the database i had to load the mdf onto the database partition of my hosts site. the dsn for the connection was created with the host.

so, i added a database to sql server management studio, imported data from the actual database then uploaded the relevant mdf.

every tme i try connecting i get a login error:
Code:
Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user ''. The user is not associated with a trusted SQL Server connection.

/stocklist.asp, line 8

get similar error on localhost, not too clued up on sql just need to get this bloody thing working as its holding up my developing the rest of my site!!

any ideas as to what/where i'm going wrong would be greatly appreciated.

regards

chris.
 
What connection string are you using for your connection object? I suggest you post it here. If there's any IP Addresses or passwords in the connection string, then replace them with X's.

This could also be a configuration issue with the server. With SQL Server, there are 2 authentication types, Windows Authentication, and SQL Authentication. The error message you see implies that you are trying to use SQL Authentication (Where you supply a user name and password) but the server appears to be configured for Windows Authentication only.

Can you verify this?


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
thanks for the speedy reply, i'm using the following connection string:
Code:
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_xxx_STRING
MM_xxx_STRING = "dsn=xxx;"
%>

didn't think any userid/password was needed with it being a hosted dsn, no passwords/id were specified when i created it.

as for what authentication is required by server, i don't know and on the occassions i talked with hosting company they never mentioned. i won't be able to reach them again now until monday, however it's redstation if that helps any!!



 
Are you able to connect to the database (on your hosted site) using SQL Server Management Studio?

If so, when you connect, what Authentication are you using (the authentication drop down on the log window)?

Once connected....
Right click server name -> Properties
On the properties page, click security (near upper left).

What is the Server Authentication set to?



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
no i havent' been able to connect that way yet, only way i've 'accessed' the database, is by setting my testing server details the same as my main ftp and then i can see the databases listed when selecting a dsn

settings to connect with sql server management studio are one of the things asked from redstation!!

this is only the second database i've connected to ever (as you can probably tell!) last time i had similar issues, but think i used a dsnless connection for that (this was about 2 years ago) i tried this using the same connection string as i'd used before but it didn't work either!

thanks for help and patience with my naivety on this
 
right, so i think i got off to a bad start with my first foray into using a database with my site!!


update:

have now purchased a sql database from my hosting company, created the database in the management panel, giving it a password etc.

then recreated a dsn for the database, making sure it included the uid/pwd for the database i created.

created a system dsn for the site, which tested successfully.

added a dsn to my site in dreamweaver which again tested ok

live page, login error :(

Microsoft OLE DB Provider for ODBC Drivers error '80040e4d'

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'xxxx'.

/stocklist.asp, line 8


agggggghh thought this was gonna be the solution i needed, any help please folks........

regards

chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top