www.webdeveloper.com
Results 1 to 8 of 8

Thread: Error in row

Hybrid View

  1. #1
    Join Date
    Apr 2004
    Posts
    71

    Error in row

    hi all,

    I have an error when I was creating a web to add data to microsoft access database
    the error is "Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005)[Microsoft][ODBC Microsoft Access Driver]Error in row
    /Add.asp, line 54
    "

    detail of my database:
    the name of the database is wardailer
    the name of the table is table1
    the primary key is ID






    the code here :
    _______________________________
    <HTML><HEAD>


    <%
    Function ChkString(str)

    str = replace(str, "<", "&lt;", 1, -1, 1)
    str = replace(str, ">", "&gt;", 1, -1, 1)

    ChkString = str
    End Function

    name = trim(ChkString(Request.form("name")))
    email = trim(ChkString(Request.form("email")))
    address = trim(ChkString(Request.form("address")))
    City = trim(ChkString(Request.form("city")))
    State = trim(ChkString(Request.form("state")))
    Country = trim(ChkString(Request.form("country")))
    Zipcode = trim(ChkString(Request.form("zip")))
    Password = trim(ChkString(Request.form("password")))

    ConnString = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("member.mdb")

    set my_conn= Server.CreateObject("ADODB.Connection")
    my_Conn.Open ConnString
    set rscheck = my_conn.Execute ("Select email from member where email='" & email & "'")

    if rscheck.eof then
    been_here_before="No"
    end if

    RScheck.close
    set rs = server.CreateObject("adodb.recordset")
    if been_here_before="No" then
    sql ="select * from member"

    RS.open Sql,my_conn,1,3
    RS.AddNew
    RS("Name")=name
    RS("email")=email
    RS("address")=address
    RS("city")=city
    RS("state")=state
    RS("country")=country
    RS("zipcode")=zipcode
    RS("password")= password
    RS("memberdate")= now()

    RS.update ' the error is here in this line
    %>
    </HEAD>
    <body bgcolor="#99ccff">

    <center><font face="Verdana" size="2">Your Account Has Been Processed!! <br>
    Your User ID is : <%=email%> &nbsp;, and your password is : <%=password%>
    </font>
    <p><a href="login2.asp"><font face="Verdana" size="2">Go to Login Page</font> </a>

    </p></center>

    <%
    else
    %>
    <center><font face="Verdana" size="2">Your have signup already with this email<br>
    Please signup with another your email address.
    </font>
    <p><a href="signup.asp"><font face="Verdana" size="2">Sign up Again! </font> </a></center>



    <%
    end if

    rs.close
    my_conn.Close
    set my_conn = nothing
    set rs = nothing
    %></P></BODY></HTML>
    _________________________________
    help me plz
    thanks alot

  2. #2
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Try using SQL to insert data into the table. Employ the INSERT INTO statement.

    Regards.

  3. #3
    Join Date
    Apr 2004
    Posts
    71
    how to implement sql statements here ???

  4. #4
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298
    Here you go.
    Code:
    sql = "INSERT INTO member (Name, email, address, city, state, country, zipcode, password, memberdate)" & _
          " VALUES (" & _
          "'" & name & "', " & _
          "'" & email & "', " & _
          "'" & address & "', " & _
          "'" & city & "', " & _
          "'" & state & "', " & _
          "'" & country & "', " & _
          "'" & zipcode & "', " & _
          "'" & password & "', " & _
          "#" & now() & "#"
    Regards,
    Andrew Buntine.

  5. #5
    Join Date
    Apr 2004
    Posts
    71
    hi my friend buntine

    the problem was fixed

    without using sql statement really the problem I found it in database itself

    thanks buntine

  6. #6
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    5,298

  7. #7
    Join Date
    Oct 2012
    Posts
    1
    hi al_3asel,

    I have the same problem you have mentioned here.

    would you tell me how you fixed that?

    thx alot

  8. #8
    Join Date
    Sep 2011
    Posts
    59
    Just make sure all values you assigned is valid (check for missing value in not null fields, numeric fields must have numeric values - empty is not a numeric, length of value must be less them field size for character values)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles