[SOLVED] asp / sql query

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Nov 16th, 2004, 14:40
Anonymous User
Guest
Posts: n/a
[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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Nov 16th, 2004, 18:32
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
are you sure the SQL database is set up to authenticate by logon?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Nov 18th, 2004, 10:16
Anonymous User
Guest
Posts: n/a
Yes it is.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Nov 18th, 2004, 15:26
Anonymous User
Guest
Posts: n/a
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Nov 19th, 2004, 08:39
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
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"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
asp, sql, query

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 15:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42