GetRows problem

Results 1 to 4 of 4

Thread: GetRows problem

  1. #1
    Mike H. Guest

    Default GetRows problem

    I am trying to do a GetRows on a recordset and getting an error which I cannot understand. Here is my code<BR><BR>&#060;%<BR>set rsOE = Server.CreateObject("ADODB.Recordset")<BR>rsOE.Ope n strOESQL, connDB, adOpenKeyset, adLockReadOnly, adCmdText<BR>if rsOE.BOF and rsOE.EOF then<BR> numOE = -1<BR>else<BR> arOE = rsOE.GetRows &#039;this is the line that gets error<BR> numOE = uBound(arOE, 2)<BR>end if<BR>%&#062;<BR><BR>Here is the error:<BR>Error Type:<BR>Microsoft VBScript runtime (0x800A000D)<BR>Type mismatch<BR>/mySite/myPage.asp, line 66<BR><BR>(line 66 is the line that does the GetRows)<BR><BR>I have tried this with forwardonly, static and keyset cursors, but they all give the same error. I did a RecordCount and get 1, so I know I am not getting an empty recordset.<BR><BR>Any ideas? Thanks in advance.<BR>Mike<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: GetRows problem

    How did you dim arOE? It shouldn&#039;t be dimmed as an array, just as <BR><BR>Dim arOE

  3. #3

    Default RE: GetRows problem

    Declare arOE as an Array. If this fails, search for getRows() ive seen an article on it

  4. #4
    Mike H. Guest

    Default RE: GetRows problem

    Derek, you are on my list of "ASP Heroes". I looked the example in the book over several times and never noticed that. As soon as I changed that, it worked fine. Curious, though, since we get an array back why it wouldn&#039;t be dimmed as an array. Anyhow, thanks for the tip.<BR><BR>Mike

Posting Permissions

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