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!

sql server access issue?!

Status
Not open for further replies.

thesimpsonator

IS-IT--Management
Jul 5, 2007
24
GB
hi guys, having trouble with connection to sql server and looking for a bit of help.

seem to get the connection working ok as i can see the table etc for creating recordset but i get the following error on page when i try accessing the database via a webpage;

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

i'm using a hosted dsn with the hosting company.

i've made sure the dsn i created with the hosting company has no password etc

any help on this would be greatly appreciated.

regards

chris
 
sorry think i should have put this in the setup/admin for sql forum but don't know how to change it!! sorry.
 
What connection string are you using?

Have you got the relevant permissions for that user set up in "Security" on your SQL Server?
 
hi, thanks for the speedy reply, i'm using a dsn thats created and hosted with our hosting company, i've no control over the sql server at all other than the creation of dsn's.

using an include on each page, which then uses the following code from the include file;

Code:
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO" 
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_connectionname_STRING
MM_connectionname_STRING = "dsn=mydsnname;"
%>

i don't know much about connecting to sql, could it be something to do with the database itself and security permissions etc on it?? tried having a look but wasn't sure if i was changing the correct thing or not!!


 
as i mentioned, the connection seems to work ok as i can see all the table aspects etc in my recordset without having to put in any passwords etc, its just an issue on the live page giving me the error shown!
 
In that case I would get hold of your hosting company and ask them what their other clients do in this kind of scenario...
 
thanks blondebier, have already spoken with them and they were about as much use as a chocolate teaspoon!!
 
just phoned them again to see what i can do, waiting on a call back.

it's redstation. don't know anyone else with them that i can contact to see how they do it!!

they basically told me that it was a coding error at my end and that that wasn't something they deal with!
 
Have you tried a DNS-less connection?

Something like :

"Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("/full/file/path/database.mdb") & ";"
 
they recommended against it, but wouldn't help with what i should be using instead!!
 
well think this is more to do with my database and permissions on it!!!! must be something i've done when i've added the database to sql server management studio!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top