Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access ASP
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access ASP Using ASP with Microsoft Access databases. For Access questions not specific to ASP, please use the Access forum. For more ASP forums, please see the ASP forum category.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access ASP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 8th, 2004, 06:35 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default 80004005 error


Dear friends,
I'm trying to get my database works through the hosting server, but without success.
I'm getting the following message error.

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/login.asp, line 14(on the code, line 14 is: ( MM_rsUser.ActiveConnection = MM_conn_bouk_website_STRING)

It's works perfectely on the testing server but on remote server.
The following code is the login.asp page that I'm trying to test through the remote server.
Is,any conflict between the testing server (IIS) and the remote server.
Please help!!!!!



MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("username"))
If MM_valUsername <> "" Then
  MM_fldUserAuthorization="userGroup"
  MM_redirectLoginSuccess="index.asp"
  MM_redirectLoginFailed="login_failed.asp"
  MM_flag="ADODB.Recordset"
  set MM_rsUser = Server.CreateObject(MM_flag)
  MM_rsUser.ActiveConnection = MM_conn_bouk_website_STRING
  MM_rsUser.Source = "SELECT username, pwd"
  If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
  MM_rsUser.Source = MM_rsUser.Source & " FROM tbl_users WHERE username='" & Replace(MM_valUsername,"'","''") &"' AND pwd='" & Replace(Request.Form("pwd"),"'","''") & "'"
  MM_rsUser.CursorType = 0
  MM_rsUser.CursorLocation = 2
  MM_rsUser.LockType = 3
  MM_rsUser.Open
  If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername
    If (MM_fldUserAuthorization <> "") Then
      Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization ).Value)
    Else
      Session("MM_UserAuthorization") = ""
    End If
    if CStr(Request.QueryString("accessdenied")) <> "" And true Then
      MM_redirectLoginSuccess = Request.QueryString("accessdenied")
    End If
    MM_rsUser.Close
    Response.Redirect(MM_redirectLoginSuccess)
  End If
  MM_rsUser.Close
  Response.Redirect(MM_redirectLoginFailed)
End If
%>

Reply With Quote
  #2 (permalink)  
Old January 2nd, 2005, 07:08 AM
Authorized User
Points: 96, Level: 1
Points: 96, Level: 1 Points: 96, Level: 1 Points: 96, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2004
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have the same problem. Have you found a solution yet? Alison

Reply With Quote
  #3 (permalink)  
Old January 2nd, 2005, 07:32 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Does the connection string variable (MM_conn_bouk_website_STRING in the example below) contain a valid connection string??

To find out, modify the code and add a Response.Write and Response.End statement, like this:
Code:
set MM_rsUser = Server.CreateObject(MM_flag)
  MM_rsUser.ActiveConnection = MM_conn_bouk_website_STRING
  Response.Write("Conn " & MM_conn_bouk_website_STRING & "<br />")
  Response.End
What do you get when you run this page? How does the connection string look like??

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #4 (permalink)  
Old January 2nd, 2005, 10:14 AM
Authorized User
Points: 96, Level: 1
Points: 96, Level: 1 Points: 96, Level: 1 Points: 96, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2004
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm getting closer. I changed my code to look like:

connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("student.mdb")
set myconnection = Server.CreateObject("ADODB.Connection")
set rsTitleList = Server.CreateObject("ADODB.Recordset")

and now get a different error, which I posted in a separate listing.
However, wher would I pu the code you suggested? infront of the above statements?

Thanks
Alison

Reply With Quote
  #5 (permalink)  
Old January 2nd, 2005, 10:17 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

The first two lines of the code I posted were from your code block, so you should have added the additional two lines (Response.Write(...) and Response.End) right after the two lines.

But it seems you fixed it; apparently your connection string wasn't OK, but this one looks fine.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ODBC Drivers error '80004005' sanju2006 Classic ASP Professional 3 August 31st, 2006 09:21 AM



All times are GMT -4. The time now is 12:24 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.