hello
I am in need of ur help my problem is
I am trying to connect my Access database with my login form
But,
My access database is on linux server and connentivity is not
working.
I want to know how 2 configure DSN. or kindly help me out for this
ITs first time i am working on linux
****My server Administrator says this..*******
You need to give a Database Interface link to MySQL via your ASP script. The
ASP drivers for MySQL are installed on our server.
***Please check my code******************
<head>
<title>User Login</title>
</head>
<%
Dim Conn
Dim RSUser
Dim SQL
Set Conn=Server.CreateObject("ADODB.Connection")
Set RSUser = Server.CreateObject("ADODB.Recordset")
accessdb=server.mappath("Forum.mdb")
'confused here about provider is it should be sqloledb something
'My database name is Forum
'table name is user
strconn="PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE="
strconn=strconn & accessDB & ";"
mySQL="Select * from User Where Userid='" & Request.Form("UserName") & "'"
'And here what should come here Help me please i have learned few tips
'from chillisoft but didnt worked..Help...
'call user(mySQL,strconn)
RSUser.Open mySQL,Conn,1,2
If RSUser.EOF Then
%>
<center>
<font face="MS comic sans" color="auqa" size="5"><%=Request.Form("UserName")%></font><br>
<font face="MS comic sans" color="auqa" size="6"><b>User Does Not Exist</b></font><br>
<font face="MS comic sans" color="auqa" size="3"><b><a href="signin.asp" target="parent">Click to try and login again</b></a></font>
<p> </p>
<font face="MS comic sans" color="auqa" size="6">OR</font>
<p> </p>
<font face="MS comic sans" color="auqa" size="3"><b><a href="newuser.asp" target="parent">Click here to join</a></b></font>
<%
Else
If RSUser("Password") <> Request.Form("Password") Then
%>
<center>
<font face="MS comic sans" color="auqa" size="5">Password is Incorrect for</font><br>
<font face="MS comic sans" color="auqa" size="5"><%=Request.Form("UserName")%></font><br>
<font face="MS comic sans" color="auqa" size="4"><b><a href="signin.asp" target="parent">Click to try and login again</a></b></font><br>
<p> </p>
<h3 align="center"><font color="#800000">OR</font></h3>
<p> </p>
<font face="MS comic sans" color="auqa" size="4"><b><a href="forgotpw.asp" target="parent">Click here to have your password emailed to you</a></b></font>
</center>
<%
Else
Session("User") = "Yes"
Session("User_ID") = RSUser("ID")
Session("UserName") = RSUser("First Name") & " " & RSUser("Last Name")
%>
<center>
<font face="MS comic sans" color="red" size="6"><b>Login Successful</b></font><br><br>
<font face="MS comic sans" color="auqa" size="4"><b>Welcome Back <%=RSUser("First Name")%></B></font><br><br>
<font face="MS comic sans" color="auqa" size="3">Your last visit was on <%=RSUser("Last Visit")%></font><br><br>
<font face="MS comic sans" color="auqa" size="4"><a href="question.htm" >Click to enter the On Line Test Contents</a> </font>
</center>
<%
RSUser("Last Visit") = Now
RSUser.Update
End If
End If
%>
</body>