ADO - returning different results rather then Query analyzer !!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

very strange thing happend today:
I wrote an sql syntax to query a sql server database:
"Select Count(*) From dbo.Func1() Where SomeCriteria"
From the sql server query analyzer i got results as a nameless column having
the value of 1

I took the SAME sql syntax and opend an ADO.Recordset using VB:

Dim Tmp as ADODB.Recordset
Tmp.Open "Select Count(*) From dbo.Func1() Where SomeCriteria",
CurrentProject.Connection, adOpenStatic, adLockReadOnly

I checked the value of Temp.Fields.Item(0) and it is now = 0 !!!

Cannot figure this out....

This is an Access XP file (.ADP) referencing the msado15.dll (ActiveX Data
Objects 2.8)

Ideas anyone ?
 
If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

If you're using Microsoft's web interface to post, you should see an
"Advanced Options" link at the bottom of the page. You can type the names of
the various groups into the Newsgroup box, separating each newsgroup name
with a semicolon.
 
Sorry.... :-(

I didn't know how to do that



Douglas J. Steele said:
If you feel you need to post to more than one group (HINT: it's seldom
necessary), please have the courtesy to cross-post (send the one message to
all groups at once), rather than multi-post (send individual messages to
each group). In this way, all responses to your post will be available
together, regardless of what group the responder was in, and the rest of us
won't have to read your post multiple times. (It also uses fewer server
resources)

If you're using Microsoft's web interface to post, you should see an
"Advanced Options" link at the bottom of the page. You can type the names of
the various groups into the Newsgroup box, separating each newsgroup name
with a semicolon.
 
Back
Top