This is a discussion on "[SOLVED] asp / sql query" within the Classic ASP section. This forum, and the thread "[SOLVED] asp / sql query are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] asp / sql query
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
||||
|
||||
|
[SOLVED] asp / sql query
Cannot get my .asp page to connect to the sql server. Error message received is
"Microsoft OLE DB Provider for ODBC Drivers error '80040e4d' [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'domain\webuser'. /e05/form1.asp, line 12" Line 12 is: conn.open "DRIVER=SQL Server;SERVER=servername;UID=domain\webuser;PWD=pa ssword;DATABASE=databasename" The UID is part of a group which has read-only access to certain tables on the database. Anyway, this even fails when the admin profile properties are substituted. What else should I check on the SQL server to allow this profile access to the data? Using SQl 2000 Sp3, Win 2003 server. |
|
|
|
#2
|
|||
|
|||
|
are you sure the SQL database is set up to authenticate by logon?
|
|
#3
|
||||
|
||||
|
Yes it is.
|
|
#4
|
||||
|
||||
|
Should the conn.open line include reference to the odbc connection name as well as the actual name of the database on the sql server?
|
|
#5
|
|||
|
|||
|
try these, see what works for you:
OLE DB Provider for SQL Server <u>For Standard Security</u> oConn.Open "Provider=sqloledb;" & _ "Data Source=myServerName;" & _ "Initial Catalog=myDatabaseName;" & _ "User Id=myUsername;" & _ "Password=myPassword" <u>For a Trusted Connection</u> oConn.Open "Provider=sqloledb;" & _ "Data Source=myServerName;" & _ "Initial Catalog=myDatabaseName;" & _ "Integrated Security=SSPI" ODBC Driver for SQL Server <u>For Standard Security</u> oConn.Open "Driver={SQL Server};" & _ "Server=MyServerName;" & _ "Database=myDatabaseName;" & _ "Uid=myUsername;" & _ "Pwd=myPassword" <u>For Trusted Connection security</u> oConn.Open "Driver={SQL Server};" & _ "Server=MyServerName;" & _ "Database=myDatabaseName;" & _ "Uid=;" & _ "Pwd=" Or oConn.Open "Driver={SQL Server};" & _ "Server=MyServerName;" & _ "Database=myDatabaseName;" & _ "Trusted_Connection=yes" |
![]() |
| Tags |
| asp, sql, query |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Query postcode issue? | meth8200 | Databases | 9 | Feb 25th, 2008 12:21 |
| [SOLVED] Mysql Query not working | nate2099 | Databases | 13 | Jan 3rd, 2008 02:28 |
| [SOLVED] joining 2 queries together to make 1 query | AdRock | Databases | 0 | Nov 18th, 2007 21:37 |
| [SOLVED] Nightmare query | AdRock | Databases | 0 | Nov 17th, 2007 15:50 |
| [SOLVED] Partial Search Query | Aerdan | Databases | 5 | Nov 7th, 2007 15:26 |