Home All Groups Group Topic Archive Search About
Author
9 Sep 2010 5:18 PM
Nobody
Have a VB6 app that is being used to pull data from a database.
Various locations have this database and it has been running
fine on all of them except for one where we are getting  the following
error message:

"the data provider or other service returned an E_FAIL status"

The connection string for the ADO connection looks like this:

Provider=SQLOLEDB;Password=MyPassword;Persist Security Info=True;User
ID=MyUser;Initial Catalog=MyDB;Data Source=MyServer

The recordset is using adUseClient, adOpenForwardOnly,
adLockBatchOptimistic

The select statement is a simple Select * from table

Only the statement query analyzer returns all of the expected records,
just errors out on one database, which
said application having been tried on 3 different computers.

Any ideas?

Author
9 Sep 2010 5:52 PM
Phil Hunt
No idea.


Show quoteHide quote
"Nobody" <trin***@nobody.com> wrote in message
news:i6b4sm$8nv$1@news.eternal-september.org...
> Have a VB6 app that is being used to pull data from a database. Various
> locations have this database and it has been running
> fine on all of them except for one where we are getting  the following
> error message:
>
> "the data provider or other service returned an E_FAIL status"
>
> The connection string for the ADO connection looks like this:
>
> Provider=SQLOLEDB;Password=MyPassword;Persist Security Info=True;User
> ID=MyUser;Initial Catalog=MyDB;Data Source=MyServer
>
> The recordset is using adUseClient, adOpenForwardOnly,
> adLockBatchOptimistic
>
> The select statement is a simple Select * from table
>
> Only the statement query analyzer returns all of the expected records,
> just errors out on one database, which
> said application having been tried on 3 different computers.
>
> Any ideas?
>
>
>
Author
9 Sep 2010 6:29 PM
ralph
Show quote Hide quote
On Thu, 9 Sep 2010 13:18:12 -0400, "Nobody" <trin***@nobody.com>
wrote:

>Have a VB6 app that is being used to pull data from a database.
>Various locations have this database and it has been running
>fine on all of them except for one where we are getting  the following
>error message:
>
>"the data provider or other service returned an E_FAIL status"
>
>The connection string for the ADO connection looks like this:
>
>Provider=SQLOLEDB;Password=MyPassword;Persist Security Info=True;User
>ID=MyUser;Initial Catalog=MyDB;Data Source=MyServer
>
>The recordset is using adUseClient, adOpenForwardOnly,
>adLockBatchOptimistic
>
>The select statement is a simple Select * from table
>
>Only the statement query analyzer returns all of the expected records,
>just errors out on one database, which
>said application having been tried on 3 different computers.
>

That is a particularly nasty error as it is the ultimate "bail-out"
for a client of a COM component. ie, a call failed and there was no
other information or it returned an error that VB or ADO couldn't
categorize as anything else. And it could be coming from anything from
the DAC/MDAC components on down.

Your best bet is to use a JIT debugger, either Dr. Watson or WinDbg
and hope the stack trace will give you the component. You also might
try enumerating the ADODB.Connection Errors collection, for additional
information.

Query Analyzer works because it isn't using the same COM stack.
However, the fact it is also reporting problems, suggest the basic
cause is with the database/data itself, or perhaps you have multiple
problems.

hth
-ralph
Author
9 Sep 2010 7:23 PM
Nobody
What I see in an error for the recordset  (under activeconnections)
object is this:

"Either BOF or EOF is True, or the current record has been deleted.
Requested operation requires a current record."

My ADO Connection object doesn't show any errors

Wish isn't helping me much.
Author
9 Sep 2010 8:47 PM
ralph
On Thu, 9 Sep 2010 15:23:32 -0400, "Nobody" <trin***@nobody.com>
wrote:

>What I see in an error for the recordset  (under activeconnections)
>object is this:
>
>"Either BOF or EOF is True, or the current record has been deleted.
>Requested operation requires a current record."
>
>My ADO Connection object doesn't show any errors
>

Ha, wish you had said this before. I thought you were getting a
spurious E_Fail Error, ie, "out of the blue" per sec.

That error is usually quite specific and accurate. Somewhere in your
navigation or chewing (query, find, search, sort, move) on the
Recordset you have managed to confuse it and it is coming up with 'no
record'.

As to why it works on other machines and not this one? My best guess
is because the data is either bad or different enough it is causing a
alternate conditional path/s.

-ralph
Author
10 Sep 2010 4:38 PM
Nobody
Show quote Hide quote
"ralph" <nt_consultin***@yahoo.net> wrote in message
news:7ahi865j0uefuihrc1anh826m4adtm53tq@4ax.com...
> Ha, wish you had said this before. I thought you were getting a
> spurious E_Fail Error, ie, "out of the blue" per sec.
>
> That error is usually quite specific and accurate. Somewhere in your
> navigation or chewing (query, find, search, sort, move) on the
> Recordset you have managed to confuse it and it is coming up with
> 'no
> record'.
>
> As to why it works on other machines and not this one? My best guess
> is because the data is either bad or different enough it is causing
> a
> alternate conditional path/s.
>

Has me stumped too. We have three of the exactly same database layouts
(internal data is a little different, but
all verified as legit data). Databases 1 and 2 the query within VB6
works as expected, just against this third database where it is
kicking out. I've seen various references to a possibility of it
having to do with date fields, which there are two in the recordset,
but I verified the data in those fields are actually dates. I even
modified the query to make sure it only returns one record (using the
primary key). Again, works great in query analyzer against this
database, nothing in VB6.

We are going to re-boot the server/database on Monday and then see
what happens.
Author
11 Sep 2010 1:35 AM
Nobody
"Nobody" <trin***@nobody.com> wrote in message
news:i6bc7m$9cc$1@news.eternal-september.org...
> What I see in an error for the recordset  (under activeconnections) object
> is this:
>
> "Either BOF or EOF is True, or the current record has been deleted.
> Requested operation requires a current record."
>
> My ADO Connection object doesn't show any errors
>
> Wish isn't helping me much.

I am not 100% sure, but I think because you are using adLockBatchOptimistic,
you get a "general" error and the details are in the Errors collection of
the Connection object. The error means that you are trying to do something
like MoveFirst, but the recordset is empty.
Author
9 Sep 2010 6:49 PM
Nobody
"Nobody" <trin***@nobody.com> wrote in message
news:i6b4sm$8nv$1@news.eternal-september.org...
> Have a VB6 app that is being used to pull data from a database. Various
> locations have this database and it has been running
> fine on all of them except for one where we are getting  the following
> error message:
>
> "the data provider or other service returned an E_FAIL status"

Hello clone! :-)

Besides what Ralph suggested, there could be a problem with MDAC
installation. See this article:

Component Checker: Diagnose problems and reconfigure MDAC installations
http://support.microsoft.com/kb/307255

You didn't mention what OS that this problem appears on. Vista and after
already contain the latest ADO and Jet service packs(SP8). ADO version is
actually 6.0+ in these OS's, so you should not have problems with these
OS's.
Author
9 Sep 2010 7:15 PM
Nobody
Show quote Hide quote
"Nobody" <nob***@nobody.com> wrote in message
news:i6ba8f$u1n$1@speranza.aioe.org...
>
> Hello clone! :-)
>
> Besides what Ralph suggested, there could be a problem with MDAC
> installation. See this article:
>
> Component Checker: Diagnose problems and reconfigure MDAC
> installations
> http://support.microsoft.com/kb/307255
>
> You didn't mention what OS that this problem appears on. Vista and
> after already contain the latest ADO and Jet service packs(SP8). ADO
> version is actually 6.0+ in these OS's, so you should not have
> problems with these OS's.

Windows XP, SP2, various patches applied. MDAC is up to date on the
clients,
probably not on the server. The server with the issue is running
Windows 2000, MS
SQL 7. Then again I have another server, Win 2000 and SQL 7, same
database
structure and it is works fine

I'll try and check some of the ADO for errors.
Author
9 Sep 2010 7:39 PM
Kevin Provance
Why don't you idiots use real names?  Or at least *pretend* to as to not
look like teenage trolls badly attempting to be "kewl".  Or does who you
really are embarrass you so much, you cannot bear to reveal yourself?


Show quoteHide quote
"Nobody" <trin***@nobody.com> wrote in message
news:i6bbpg$7jp$1@news.eternal-september.org...
:
: "Nobody" <nob***@nobody.com> wrote in message
: news:i6ba8f$u1n$1@speranza.aioe.org...
: >
: > Hello clone! :-)
: >
: > Besides what Ralph suggested, there could be a problem with MDAC
: > installation. See this article:
: >
: > Component Checker: Diagnose problems and reconfigure MDAC
: > installations
: > http://support.microsoft.com/kb/307255
: >
: > You didn't mention what OS that this problem appears on. Vista and
: > after already contain the latest ADO and Jet service packs(SP8). ADO
: > version is actually 6.0+ in these OS's, so you should not have
: > problems with these OS's.
:
: Windows XP, SP2, various patches applied. MDAC is up to date on the
: clients,
: probably not on the server. The server with the issue is running
: Windows 2000, MS
: SQL 7. Then again I have another server, Win 2000 and SQL 7, same
: database
: structure and it is works fine
:
: I'll try and check some of the ADO for errors.
:
:
Author
10 Sep 2010 4:29 PM
Nobody
"Kevin Provance" <k@p.c> wrote in message
news:i6bd6b$ddv$1@news.eternal-september.org...
> Why don't you idiots use real names?  Or at least *pretend* to as to
> not
> look like teenage trolls badly attempting to be "kewl".  Or does who
> you
> really are embarrass you so much, you cannot bear to reveal
> yourself?
>

I mainly do it to tick people off. Much as the same reason I use a
fake e-mail address. Does that other you to or do you have something
that could be actually meaningful to add to the conversation?
Author
10 Sep 2010 8:03 PM
Mike S
On 9/9/2010 12:39 PM, Kevin Provance wrote:
> Why don't you idiots use real names?  Or at least *pretend* to as to not
> look like teenage trolls badly attempting to be "kewl".  Or does who you
> really are embarrass you so much, you cannot bear to reveal yourself?
<snip>

Identity theft for one. And what's to prevent someone from using a name
that is not their own?
Author
10 Sep 2010 8:58 PM
Tony Toews
On Fri, 10 Sep 2010 13:03:04 -0700, Mike S <ms***@yahoo.com> wrote:

>Identity theft for one. And what's to prevent someone from using a name
>that is not their own?

Court order.  <smile>  One person I know of, as part of their
sentencing agreement,  had to sign all public postings with his real
name.  As his style was distinctive, to say the least, he was honest
for the next two years.  And still is in the newsgroups where I see
him.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated see http://www.autofeupdater.com/
Author
10 Sep 2010 9:12 PM
Kevin Provance
"Tony Toews" <tto***@telusplanet.net> wrote in message
news:5t6l861pf2atiq07j6801b4shli58k2md5@4ax.com...
: Court order.  <smile>  One person I know of, as part of their
: sentencing agreement,  had to sign all public postings with his real
: name.  As his style was distinctive, to say the least, he was honest
: for the next two years.  And still is in the newsgroups where I see
: him.

You lurking in one of the news.admin.net-abuse.* groups too?  Those folks
are vicious.  They make this group look like a catholic church on Sunday.
Author
10 Sep 2010 9:34 PM
Tony Toews
On Fri, 10 Sep 2010 17:12:02 -0400, "Kevin Provance" <k@p.c> wrote:

>: Court order.  <smile>  One person I know of, as part of their
>: sentencing agreement,  had to sign all public postings with his real
>: name.  As his style was distinctive, to say the least, he was honest
>: for the next two years.  And still is in the newsgroups where I see
>: him.
>
>You lurking in one of the news.admin.net-abuse.* groups too?  Those folks
>are vicious.  They make this group look like a catholic church on Sunday.

No, this is in the Microsoft Access newsgroups.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
  updated see http://www.autofeupdater.com/