Results 1 to 2 of 2

Thread: [dirty resolved...] Weird problem on SELECT * FROM X;

  1. #1

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088

    Unhappy [dirty resolved...] Weird problem on SELECT * FROM X;

    Hi, I got a huge problem when getting data out of my table. It's a huge one because the code works for any table except one.

    I'm calling the .Execute function which returns a RecordsAffected of 2 which is true because there are 2 records in my table. I also check for .state being adStateOpen. Then I'm checking for .BOF and .EOF and the weird thing is that they both are set to True! And as mentioned before, the same code works perfectly fine when getting records from another table.

    The code looks like this:

    VB Code:
    1. Set Results = Connection.Execute("SELECT * FROM banlist;", Count)
    2.     '## Count is 2 at this point
    3.  
    4.     'MsgBox Results.RecordCount
    5.     '## Gettin Error -2147467259 "Provider returned E_FAIL" here
    6.    
    7.     If Results.State = adStateOpen Then
    8.         If Not (Results.EOF And Results.BOF) Then: Results.MoveFirst
    9.         '## If I skip the EOF/BOF check the same error
    10.         '## -2147467259 is raised here
    11.     End If
    Of course I can't access the data after this, but I guess the data was transferred because Count returned 2 as it should...

    I'm running out of ideas here...
    Last edited by Fox; Mar 20th, 2004 at 07:42 PM.

  2. #2

    Thread Starter
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    I tried dropping the table and adding the values one for one again. I noticed the code works fine unless the table contains more than 1 datetime or timestamp column. Any other data types work fine.

    *any* ideas?
    Last edited by Fox; Mar 20th, 2004 at 07:45 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width