Jump to content

tamakuwalapranav

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by tamakuwalapranav

  1. Hi all, I have connect my ASP file with MS Access database and I have hips of records in my database.Actual senario:when I start my application, it will start with login page. Once I enter my username and password , it will check in database and it finds and record under that username and password, it will display that users personal information and few others information according to HTML designing page. But whats happening is that I can enter my username and password but after that page comes up with this erros msg:Error Type:ADODB.Field (0x80020009)Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.Now I want to know that how can I remove this error msg and where do put loop or any thing that could help me out to remove this error.My Coding: <%if session("txtusername")="" thenResponse.Redirect("default.asp")end if%><%if session("txtusername")="" thenResponse.Redirect("default.asp")end if%><%loginname= session("txtusername")username=request.form("username")password=session("txtpassword") Set con = Server.CreateObject("ADODB.Connection")con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Academic.mdb")Set rs1=server.CreateObject("ADODB.Recordset")sql1="select * from student where username='"&txtusername&"' and password='"&txtpassword&"'"rs1.open sql1,con, adCmdTable%><html><head><title>Student Enrolment Form</title><h4> <font color="#FFFFFF">Personal Information </font></h4><tr><td align="right"><font size="2"><b>Family Name (*)</b></font><td colspan="2"> <div align="left><font size="2"><input name="famname" onBlur= isAlpha(this) size="35" maxlength="20" value="<% = rs1("lastName") %>" ></font></div></td></tr><br><input type="submit" name="Submit" value="Update">   <input type="reset" value="Cancel"><br></br><centre> <b> <font color="05379A"> Note: (*) mendetory fields </font></b> </form></body></html><%rs1.CloseSet rs1 = NothingSet con = Nothing%>In above code, lastName is my database field.Cheers,PRANAV

  2. Hi,I am really sorry abt my comments. Actually, I am looking for same thing which is provided by you and i am trying to implement it in my project hopefully i can intrgrate it with my code. I am really thankful for your help. I am having other problem with login page. Actual secnario is describe below:I am creating student website. I am done with everything such as student enrolment form and registration but now my client requirement is that if any student visting my website and if he/she wants to apply for any course , they need to register for that so that next time they come to our site , they need to enter their username and password to fatch their all details.I tried to generate my login page but what happening is that it is showing first record , whether I enter last record or first .. I think this problem occur due to imappropriate loop. If you have any idea or any coding related to this , pls send me according to your time but try to send me asap..Again thanks for your help and support.

    I'm not exactly sure what you're asking, but it sounds like this:You have a form for users to search your database. If a user types "bunny", it will search all records containing the word bunny; if a user types "id=5", it will bring up the appropriate article so the user can modify it.Most likely, you're going to use something like this: search.asp
    <% Option Explicit %><html><body><form action="search.asp" method="post">    <input type="text" name="search"><br>    <input type="submit" value="Search"></form><%Dim Search, Conn, RS, SQLDim Regex, Match, MatchesSearch = cstr(Request("search"))if Search <> "" then   'Just going to perform a quick regex to see if the user typed "ID=" in the   'search field.   Set Regex = New Regexp   Regex.Pattern = "^ID=(\d+)$"   Regex.IgnoreCase = True   Regex.Global = True   Regex.Multiline = True    If Regex.Test(Search) then        Set Matches = Regex.Execute(Search)        For Each Match in Matches            SQL = "Select * From your_table WHERE ID = " & Match.SubMatches(0)        Next    else        SQL = "Select * From your_table WHERE SearchField Like '%" & Search & "%'"    End if    Set Conn = Server.CreateObject("ADODB.Connection")    Set RS = Server.CreateObject("ADODB.RecordSet")    Conn.Open your_connection_string    RS.Open SQL, Conn, 1, 1        'display form data, and be sure to include a hidden field with the RS("ID")        'so you can edit the form record.    RS.Close    Conn.Close    Set Conn = nothing    Set RS = nothingEnd if%></body></html>

  3. Hello, I am trying to find data from my database. In my database, I have made up auto generate ID which will increment whenever data will insert from XHTML form. But now what I want to do is that if any use write ID in search field , that data should come up on the screen and user can modify it and save again to database.I have written a query as well but nothing working properly. If any one know any website or having these kind of code , please upload it asap..

  4. THanx buddy... i found my solution and done with everything..... Nyways thanx for ur suggestion...

    Can u post the DB u have designed. Want to c if it is normalized properly.Name with the fields & primary - foreign key relation ship.As far as data-type mismatch is concerned it may be bcoz of EG : suppose u create a number field & assign text that its mismatch of type.Once check if the DB u created is having proper datatypes.

  5. Hi All,I am creating student website which contain student personal info, academic info and agent info. What I want to do is that I want to make three different tables and connect it with each other using ID as a primary key.I have already create single database contain all information and its working well enough it add data into it and display all records. However, I want to normalize this data into three different database file and I am working on it but I am getting error msg like- type mismatch. I dont know how can I connect with all this database using ASP commands. Pls help me out... It's URGENT !!!!!!Thanx friends....

×
×
  • Create New...