Results 1 to 8 of 8

Thread: 0x800A0BCD help

  1. #1
    Join Date
    Nov 2003
    Posts
    6

    Unanswered: 0x800A0BCD help

    no_id = request.querystring("no")

    strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/zerobytes/db/BEboard.mdb")
    Set my_Conn = Server.CreateObject ("ADODB.Connection")
    my_Conn.Open strConnString
    Set rs = Server.CreateObject("ADODB.Recordset")
    chk = "Select * From BE_memo where no='" & no_id & "'"
    'chk = "Select * From BE_memo where no=" & no_id
    'I would like to know what the different between the 2 at above
    rs.Open chk, my_conn, 1,3
    from_id = rs("from_id") // from what i know line 21 is here
    dbclose()' this function will close the database


    Error Type:
    ADODB.Field (0x800A0BCD)
    Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
    /be-board/memo_view.asp, line 21

    Of course never the less there is record inside the table. weird one was i have no problem when i use chk = "Select * From BE_memo" of course we know that it is only display the 1st entry.
    but what could it be wrong ? am i using the wrong method? but i have no problem retieving data from a different table by using the same calling method.

    BE_memo
    -no
    -from_id
    -to_id
    etc

  2. #2
    Join Date
    Aug 2003
    Location
    Belgrade
    Posts
    68

    Re: 0x800A0BCD help

    The error message says exactly what is happening. You have an SQL statement with a WHERE clause. What happens if request.querystring("no") returns an empty string? You are trying to retrieve all records for which no = '' Since you don't have any such record, you get an empty Recordset. You should check for that condition:

    if (Not rs.BOF) And (Not rs.EOF) Then
    from_id = rs("from_id")
    End If

  3. #3
    Join Date
    Nov 2003
    Posts
    6
    thanks mashinovodja ermm ur way really works no more error but now the thing doesn't show anything because i think it really is either BOF or EOF.

    really got headache for that i can comfirm that there reallly a field in the table named "no" and there is record inside the field.

    i double checked the thing where the rs("no") are exactly the same as the no_id.

    i even use response.write no_id to check for the value and proven there is value for the no_id.

    so for those "guru" out there what else could be wrong ?

  4. #4
    Join Date
    Nov 2003
    Posts
    6
    yoo mate i think i know what wrong with it edi.. the problem with that is . i am passing the value to the next page using querystring by then when i was "searching" it thru the database the "no" field is an auto number where it is a integer. so where by a string could not compare wit the integer right ?

    so that wat i was so headache about what can i do if i don't want change the 'no' field type ( i wan to remain it as auto number)
    by then how could i pass by "no" value to the next page ?
    anyother way then cookies or form. what else could i do huh ?
    could i pass a integer value using query ?

  5. #5
    Join Date
    Aug 2003
    Location
    Belgrade
    Posts
    68
    Originally posted by zerobytes
    yoo mate i think i know what wrong with it edi.. the problem with that is . i am passing the value to the next page using querystring by then when i was "searching" it thru the database the "no" field is an auto number where it is a integer. so where by a string could not compare wit the integer right ?
    Right, but in that case you should get a "datatype mismatch" error. Did you? So, your code should read:

    chk = "Select * From BE_memo where no=" & no_id

    But before this statement insert a MsgBox ">" & no_id & "<" statement (or display no_id on your page), just to know what is the actual value of no_id you get.

    how could i pass by "no" value to the next page ?
    anyother way then cookies or form. what else could i do huh ?
    could i pass a integer value using query ?
    Yes. For example: ... some url ... ?no=555
    You can pass whatever type you want in a querystring. You will always get a string, anyway :-)) It is up to you to decide how will you treat it on the receiving side. I don't know about other scripting languages, but VBScript is typeless, or rather, knows only Variants, depends on how you look at it.

  6. #6
    Join Date
    Nov 2003
    Posts
    6
    Right, but in that case you should get a "datatype mismatch" error. Did you? So, your code should read:

    chk = "Select * From BE_memo where no=" & no_id

    But before this statement insert a MsgBox ">" & no_id & "<" statement (or display no_id on your page), just to know what is the actual value of no_id you get.
    naah i didn't get any error message for that reason. these why i am wondering what could it be wrong with that.

    and ps i don't have problem select the other string field in the table
    i tried to select rs("name") in the table and i have no problem doing that.
    and i able to retieve all the info i want.

    i did check at the value ..
    no_id = request.querystring("no")
    response.write no_id

    for example... memo_write.asp?no=3
    it prints 3

    this is the 1st time i got such silly problem. and i can't even see what wrong with the coding and this silly problem been trouble me for a week long edi i guess hahah .. till now i still can't figure out the ways to solve this out
    Last edited by zerobytes; 11-14-03 at 02:23.

  7. #7
    Join Date
    Nov 2003
    Posts
    6
    yoo mate ... i decided why don't i show the sample code. hehe

    download the file
    http://www28.brinkster.com/zerobytes/help/download.asp

    so if the problem is solved why don't you guys upload it or e-mail me or just notify me on what changes has been made.

    i included the database as well so check it out. just unzip the zero.zip to your IIS DIR

    thanks you guys
    Last edited by zerobytes; 11-15-03 at 01:11.

  8. #8
    Join Date
    Nov 2003
    Posts
    6
    yoo guys i got the thing work edi ..
    thank for the help anyway

Posting Permissions

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