E_Fail Status with VB6

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?



0
Nobody
9/9/2010 5:18:12 PM
vb.general.discussion 1016 articles. 0 followers. Follow

14 Replies
3995 Views

Similar Articles

[PageSpeed] 17

No idea.


"Nobody" <trinity@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?
>
>
> 


0
Phil
9/9/2010 5:52:30 PM
On Thu, 9 Sep 2010 13:18:12 -0400, "Nobody" <trinity@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
0
ralph
9/9/2010 6:29:31 PM
"Nobody" <trinity@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.


0
Nobody
9/9/2010 6:49:53 PM
"Nobody" <nobody@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. 


0
Nobody
9/9/2010 7:15:58 PM
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. 


0
Nobody
9/9/2010 7:23:32 PM
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?


"Nobody" <trinity@nobody.com> wrote in message 
news:i6bbpg$7jp$1@news.eternal-september.org...
:
: "Nobody" <nobody@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.
:
: 

0
Kevin
9/9/2010 7:39:57 PM
On Thu, 9 Sep 2010 15:23:32 -0400, "Nobody" <trinity@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
0
ralph
9/9/2010 8:47:23 PM
"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?


0
Nobody
9/10/2010 4:29:57 PM
"ralph" <nt_consulting64@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.


0
Nobody
9/10/2010 4:38:18 PM
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?
0
Mike
9/10/2010 8:03:04 PM
On Fri, 10 Sep 2010 13:03:04 -0700, Mike S <mscir@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/
0
Tony
9/10/2010 8:58:25 PM
"Tony Toews" <ttoews@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. 

0
Kevin
9/10/2010 9:12:02 PM
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/
0
Tony
9/10/2010 9:34:46 PM
"Nobody" <trinity@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.


0
Nobody
9/11/2010 1:35:30 AM
Reply:

Similar Artilces:

DataGrid (VB6) in Acces2003 form
Hi all, DataGrid from VB6 in in main form. I build recordset : Dim qdf_temp As QueryDef Set qdf_temp = CurrentDb.CreateQueryDef("", tmpSQLstr) Dim rs As Recordset Set rs = qdf_temp.OpenRecordset If I try DataGrid.DataSource=rs I receive message "Type mismatch" Why ? Where is mistake ? What is difference when I build recordset which based on DAO or ADO? Is different internal structure or something another ? Regards Jurek Not sure, but since you're dealing with objects, not variables, you probably need to use Set DataGrid.DataSource=rs -- ...

I found a nice one, wikibook about VB6
http://en.wikibooks.org/wiki/Visual_Basic Havent gone trough it yet though... //CY ...

status bar options
While poking around in Access 2007, I right clicked in the right hand corner of the status bar and got a popup with several options that could be toggled. All of them were familiar to me except one called "Kana Mode." Plugging Kana Mode into a search of online help, this community, and offline help resulted in a big fat zero. So my question: does anyone know what this is. I couldn't see any effects of toggling it on or off. Thanks in advance. JungZimm, From Microsoft's site... This indicator tells you whether you have enabled the Japanese phonetic w...

Status unreachable PLEASE HELP
Hello all, When I go to tools => Monitoring and status => status in the exchange system manager, in the right pane, one of my servers in another routing group is reported unreachable. However, mail connectivity is working between the 2 routing groups. Any idea's? Thanks Glenn ...

Deleting Send/Receive Status
One of our mailboxes apparently has an email that is trying to download (1.72KB) and although I cancel it, the same email tries to download each time I log on - often taking 15+ minutes to get to 1.72 KB but no data is received. Anyway to stop this action? Thanks. ...

Stock Status and Purchase Receipts Report
Should the Stock Status report and the Purchase Receipts Report reoncile to each other? If they are, what would cause the reports to total different? Neither is a modified report. Does everyone use the Stock Status report to reconcile to the General Ledger? thanks! -- Doug The purchase receipts report will be based on actual cost while the stock status report is based on your inventory valuation method. (average, lifo, fifo, etc.) The quantities should be the same but the valuation may be different. Which report you use to reconcile to gl depends a lot on your valuation method. Mos...

Change Status of Closed Batches
After several years of using RMS without QuickBooks Integration we have now got it working. However, all of the previous batches are still showing. Is there a SQL Statement that will change the Status of these batches to Posted, so they will no longer appear and clutter up the "Post Closed Batches" window? We have 4 lanes, using Version 1.2. Thank You David, What I did when I got integrated was to use Quickbooks file for accounting type and posted all the old batches that way. After your done posting you can change the accounting type back to Quickbooks 2003 and your good to...

email status in Corporate or Workgroup mode
A client of mine recently changed from Internet Only mode in Outlook 2000 to Corporate or Workgroup mode. While in Internet Only mode, the lower right corner of the status bar used to give an indication of what was happening when he checked his email. For example, it would say "connecting to server" and then let him know how many messages where being downloaded. Now in Corporate or Workgroup mode, that status is no longer displayed. Instead, he only sees a popup window that says that it is sending and receiving. Is there any way to display the status of the email process in...

Delivery Status Notification (Delay) #4
All: Just deployed an Exchange 2003 server... Full win 2003 domain, all XP clients w/ Office 2003. Since the move from POP3 to exchange, We have been seeing an enormous amount of delays. These delays are when sending to addresses outside our domain... Internal email functions fine. We use internet desktop faxing, and seem to be able to receive internet faxes, just not send them... Get the same delay message. Any ideas here? I don't even know where to start. TIA, Willis Can you give some details on how your system is set up? How is your system set up to send out SMTP mail ...

Activity Status 04-26-05
How to change the Status of an Activity??? It is Open for some tasks and i need to mark it completed or closed. When i edit the activity , it is still read only ...

I can drag my windows over the toolbar and status bar?
I have a MDI application and I have modeless dialog boxes I cant drag outside the parent window. But I can drag them over the toolbar and status bar. Here is my code; (x3 is my dialog window) if (!x3) { x3 = new CDlg3; x3->Create(IDD_DLG3, this->GetMainWnd()); x3->SetParent (this->GetMainWnd()); } x3->ShowWindow (SW_SHOW); x3->UpdateWindow(); any ideas? Chris, The tool- and statusbars are, as is the dialog, children of the same parent. Thus you being able to drag the dialog over the bars is the expected behaviour. Johan Rosengren Abstrakt Mekanik AB "...

How do I eliminate multiple task status reports in Outlook?
In Outlook, if I keep a task open for several minutes while working on it, it sends a Task Status Report to the person who generated the task every three minutes. I'd like to turn this off so that the only time anyone gets a report is when I click Send Status Report. ...

Updating Status Bar,
I have 4 views and I have a status bar pane that outputs the mouse position coordinates relative to the view the mouse lies in. I added a command user interface update handler (in the view class) to update the status bar with the latest coordinates. However, it only works (i.e., updates the coordinates in real time) for one of the view windows until I click on a different one (then it works for the view I clicked but no others). How can I get it to always work whenever the mouse lies inside a view window? That's right. That's how it is supposed to work. The update handle...

Produce a Recorset on a VB6 server for graph data in Excel
I would like to produce a recordset on my server (VB6) then in Excel produce a range of data. (client-server application) (RS is the usual way in this application to transfer data between Client and server especially for large data contents like this) but maybe I need to reconsider. Currently Excel 97 but sson Excel 2003 (XML can be used) The range should be dynamic and will consist of a fix Y axix of 365 days and a dynamic X axix of different companies and their shareprices for these days producing columns of shareprices for these days for different companies. The top row should ha...

Rows of data, using status columns to sort data to pie chart on another worksheet tab
Hi there, 1. I have 50 rows of data. There are many columns, but, there is one status column that I use to group the rows of data into relationships. I would like to build individual charts based on the status column. So, if I say these items are part of "Group A", information from those rows that are "Group A" will automatically show up on a chart on the "Group A" worksheet tab pie chart. I will have "Group A", "Group B", "Group C" pie charts on seperate worksheet tabs. Now, I want to move an item from "Group A" to ...

Collection Management Note Status
Has anyone run into trouble with Notes not being marked as completed when the invoices that are attached to it are fully paid? It seems a majority of the notes do get marked as completed, but there are some that don't seem to clear and I don't know why. The Note type is the same for those that don't clear and those that do. Any ideas? ...

What happened to the column number count in the status bar?
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel I am new to using Office with a mac, and I have a lame question. I am using Word 2008. There used to be options as to what counts and tools you could put at the bottom of the window. Such as, word count, page number, column number etc. I don't see any options to customize the status bar. Am I missing something? It used to be as easy as right clicking (w/PC) and selecting which tool you wanted. How do I do this with my Mac??? Any help is appreciated. -B Yeah, evidently the guy/gal in charge of those features was out...

Messenger status is showing as offline ?
Hey, I recently understand that there is a big server problem with messenger where my messenger status shows as offline, while actually i am online. At first I think it was some problem with messenger so I delete it and try to re-install it, but after installation the messenger icon does not show up at all, I don't know why? Any solutions? Same issue here. Haven't found a solution, I think we have to wait until Microsoft fixes their server problem. Greetings, This is generally what happens when the process is stuck. Pop open the Task Manager and look for multiple ...

How to get the Loacl Printer status?
Hi, I am creating an application in VC++ 6.0 to find out the current status of local printer. I am using EnumPrinters function with LPPRINTER_INFO_2. Funtion is working , even other information regarding printer is available, but 'status' is always 0 while printer is out of paper. Code is given below: void displayPrinterStatus() { DWORD cbNeeded = 0; DWORD cReturned = 0; DWORD dwItem; LPPRINTER_INFO_2 lpInfo; DWORD noOfPrinters=0; EnumPrinters ( PRINTER_ENUM_LOCAL , NULL, 6, NULL, 0, &cbNeeded, &noOfPrinters ) lpInfo = (LPPRINTER_INFO_2)HeapAlloc ( GetPro...

Undeliverable: Delivery Status Notification (Failure)
A configuration error in the e-mail system caused the message to bounce between two servers or to be forwarded between two recipients. Contact your administrator. What does this mean? I have his email forward to external account and that works. But inside the organziation I get that message ...

How do I add caps lock notification to my Status bar? Help!
In Word, how do I add the caps lock notification to my Status bar? Any help would be greatly appreciated. libralady9 wrote: > In Word, how do I add the caps lock notification to my Status bar? > Any help would be greatly appreciated. If you have Word 2007, right-click anywhere on the status bar and click the Caps Lock item in the menu. The words "Caps Lock" will appear in the status bar if caps lock is turned on, and they'll disappear when caps lock is turned off. For earlier versions of Word, there is no caps lock indicator (I think there was one much e...

Check Printer Status with MFC
Hi All, May I know if there is an easy way for me to check the printer status before sending any data to the printer? I am programming in MFC, VC 6.0 and Win2K. For some reason, I must use API OpenPrinter() to access the printer. Cannot access the port directly. What I need is only to ensure that the printer is able to print. And yes, the printer driver does prompt a message when the printer is not ready. But I need to be able to detect this in my program. Thanks in advance. Regards Hi, http://www.codeguru.com/printing/std_printing.shtml With Regards, R.Selvam ...

Item Picture On Html Status Bar RMS 1.2/1.3
hi everyone, if are interested on this y read a post here how to do it but i make my own changes. Open the Status.htm on your program files folder microsoft retail/ store operations/html with frontpage o notepad and replace with this code: <html> <head> <meta http-equiv="Content-Language" content="en-us"> <title>Default Status Screen</title> <style> .LineHeader { font-family: Arial; font-size: 16; color: white; background-color: black; } .LineDivider { color: white; background-color: gray; } ...

How to add a new Contract State / Status
Hi Is it possible to add a new "State" or "Status" for the "Contract"? I would like to add a new "State" or "Status" called "Changed" to the available status codes. TIA walterd Hi Walterd, It is possible to include a new status using the statuscode attribute. However, I'm not sure if there is a way to allow the user to select what state the contract should be in. HTH, Niths "walterd" wrote: > Hi > > Is it possible to add a new "State" or "Status" for the "Contract"? &g...

Sotock status value recreation through IV30300 table?
Hi, I am trying to find the difference between my goods received report and my stock status report. I have managed to recreate the goods received report through a view off the IV10200 table. These values agree to the Goods received report's values (But this does not help). However if I try and recreate the stock status report off the IV30300 table my values do not agree. I realise one issue is the transfers in the report so I am trying to use a view like below to rectify this problem: Create view ERP_IV30300Breakdown as select TRXSORCE,DOCTYPE,DOCNUMBR,DOCDATE,HSTMODUL,CUSTNMBR,I...