Question about CursorLocation property.

Discussion in 'Databases' started by pupu79, Feb 16, 2003.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I tried to following statements:

    Dim RS
    Set RS = Server.CreateObject("ADODB.RecordSet")
    RS.CursorLocation = adUseClient

    But there was an error reported on the 3rd statement. It said the arguement out of range. I looked up the microsoft document and found that actually CursorLocation is an enum constant. The value of adUseClient is 3. So I put 3 in the last statement instead of adUseClient. Now it works well.

    Why? I assume the compiler should know that adUseClient is equal to 3.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    I believe you have to include certain file that include these constants.

    quote:Originally posted by pupu79

    I tried to following statements:

    Dim RS
    Set RS = Server.CreateObject("ADODB.RecordSet")
    RS.CursorLocation = adUseClient

    But there was an error reported on the 3rd statement. It said the arguement out of range. I looked up the microsoft document and found that actually CursorLocation is an enum constant. The value of adUseClient is 3. So I put 3 in the last statement instead of adUseClient. Now it works well.

    Why? I assume the compiler should know that adUseClient is equal to 3.
    </blockquote id="quote"></font id="quote">
     
  3. What Bruce writes is accurate. You need to include the adovbs.inc file on the page.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page