PDA

View Full Version : Db Problem..


Baleric
04-07-2005, 06:40 AM
This is my error

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xd34 Thread 0x69c DBC 0x15b790c Jet'.
/SamuraiDaveForums/Pages/validate.asp, line 18




this is my code

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/Dave.asp" -->
<%
Dim cnnLogin
Dim rstLogin
Dim str_Username, str_Password
Dim strSQL

%>

<%

strSQL = "SELECT * FROM _users " _
& "WHERE _username='" & Replace(Request.Form("_Usermame"), "'", "''") & "' " _
& "AND _password='" & Replace(Request.Form("_Password"), "'", "''") & "';"

Set cnnLogin = Server.CreateObject("ADODB.Connection")
cnnLogin.Open("DRIVER={Microsoft Access Driver (*.mdb)};" _
& "DBQ=" & Server.MapPath("SDdb.mdb"))



Set rstLogin = cnnLogin.Execute(strSQL)

If Not rstLogin.EOF Then %>
<% session("ShowDetails1") = true
session("MM_NEWSUSERNAME1") = Request.Form("_username")

response.Redirect("welcome.asp") %>

<%Else%>
<%response.Redirect("denied.asp")%>
<%End If %>

<%

rstLogin.Close
Set rstLogin = Nothing
cnnLogin.Close
Set cnnLogin = Nothing

%>

Bullschmidt
04-07-2005, 07:56 AM
Perhaps check this out:

Why do I get database-related 80004005 errors?
http://www.aspfaq.com/show.asp?id=2009

And for a better Access connection string (Jet):

Able Consulting - ADO Connection String Samples
http://www.able-consulting.com/ADO_Conn.htm

Baleric
04-07-2005, 09:43 AM
didnt help me :( ill go over everything again, just to make sure though

Baleric
04-07-2005, 02:55 PM
is till cant get it working i have switched and swapped files and everything it deosnt want to work... :(