Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    31

    Unanswered: help in database question!

    i have to join 2 table together and retrieve value from 2 table
    i have a car and rental table

    <%
    set oRS = server.createobject("ADODB.recordset")
    SQL = "SELECT * FROM Rental R,Car C where R.Model = C.Model"
    'oRS.Open SQL , oC, adOpenDynamic, adLockOptimistic, adCmdText
    %>

    response.write(oRS("Daily Rate"))

    ADODB.Recordset error '800a0cc1'

    Item cannot be found in the collection corresponding to the requested name or ordinal.

    but this error occurs.
    daily rate is from car table.
    how?

  2. #2
    Join Date
    Oct 2003
    Posts
    3

    Re: help in database question!

    remove the comment tag(') before the oRS.open first and then check again:
    oRS.Open SQL , oC, adOpenDynamic, adLockOptimistic, adCmdText



    Originally posted by zw^
    i have to join 2 table together and retrieve value from 2 table
    i have a car and rental table

    <%
    set oRS = server.createobject("ADODB.recordset")
    SQL = "SELECT * FROM Rental R,Car C where R.Model = C.Model"
    'oRS.Open SQL , oC, adOpenDynamic, adLockOptimistic, adCmdText
    %>

    response.write(oRS("Daily Rate"))

    ADODB.Recordset error '800a0cc1'

    Item cannot be found in the collection corresponding to the requested name or ordinal.

    but this error occurs.
    daily rate is from car table.
    how?

Posting Permissions

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