Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




The Data Provider Or Other Service Returned An E_FAIL Status


When I am retrieving a ADODB recordset with following sql-statement
I sometimes get following error when I do a MOVENEXT statement in this recordset:
‘The data provider or other service returned an E_FAIL status’.


SELECT TOP 100 FROM tableX
WHERE tableX.fieldY IS NULL
ORDER BY PK_tableX

The recordset is read only and disconnected.
It is created with the following properties:

With rst
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.ActiveConnection = conDB
End With

Set rst.ActiveConnection = Nothing

The database is sql-server 7.0 SP4
We are using the OLEDB provider for sql-server




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
The Data Provider Or Other Service Returned An E_FAIL Status
When I am retrieving a ADODB recordset with following sql-statement
I sometimes get following error when I do a MOVENEXT statement in this recordset:
‘The data provider or other service returned an E_FAIL status’.


SELECT TOP 100 FROM tableX
WHERE tableX.fieldY IS NULL
ORDER BY PK_tableX

The recordset is read only and disconnected.
It is created with the following properties:

With rst
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.ActiveConnection = conDB
End With

Set rst.ActiveConnection = Nothing

The database is sql-server 7.0 SP4
We are using the OLEDB provider for sql-server, that ships with MDAC 2.1 SP2

Data Provider Or Other Service Returned A E_FAIL Status.
Windows XP/Visual Foxpro 6.0/Visual Basic 6.0 SP5

Hi all,

I am getting this error:

Run-time Error '2147467259 (80004005)
Data provider or other service returned a E_FAIL status.

I am getting the error when doing an insert from a VFP6 database into another VBF6 database table.

I have observed that it seems to stem from the .movenext statement.

Anyone have any past experience with this and solving it?

I have downloaded the latest vfpoledb from Microsoft

Thanks in advance.


VB Code:
Dim sSQL As String     Do While Not rs(2).EOF            'sSQL = "SELECT * FROM orders WHERE order = " & Text1.Text    sSQL = "INSERT INTO workorder_tmp (forder_id,fline_no,fcust_no,fcust_name,fdrawing_no,forder_date,fqty_req,fmat_no,fmat_descr,fmat_thick,fmachine,fuser_defined1,fuser_defined2,fuser_defined3,fuser_defined4) VALUES ('" & rs(2).Fields("Order").Value & _    "'," & rs(2).Fields("LINE_NO").Value & _    ",'" & rs(2).Fields("CUSTOMER_NO").Value & _    "','" & rs(2).Fields("CUSTOMER_NAME").Value & _    "','" & rs(2).Fields("DRAWING").Value & _    "'," & rs(2).Fields("REQ_DATE").Value & _    "," & rs(2).Fields("QUANTITY").Value & _    ",'" & rs(2).Fields("ITEM_CODE").Value & _    "','" & rs(2).Fields("ITEM_DESCRIPTION").Value & _    "'," & rs(2).Fields("THICKNESS").Value & _    ",'" & rs(2).Fields("MACHINE").Value & _    "','" & rs(2).Fields("CUSTOMER_DIST").Value & _    "','" & rs(2).Fields("DISTRICT").Value & _    "','" & rs(2).Fields("Width").Value & _    "','" & rs(2).Fields("LENGTH").Value & "')"    '      db(1).Execute sSQL      rs(2).MoveNext   'Debug.Print sSQL   Loop

The Data Provider Or Other Service Returned An E_FAIL Status
When I am retrieving a ADODB recordset with following sql-statement
I sometimes get following error when I do a MOVENEXT statement in this recordset:
‘The data provider or other service returned an E_FAIL status’.


SELECT TOP 100 * FROM tableX
WHERE tableX.fieldY IS NULL
ORDER BY PK_tableX

The recordset is read only and disconnected.
It is created with the following properties:

With rst
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.ActiveConnection = conDB
End With

Set rst.ActiveConnection = Nothing

The database is sql-server 7.0 SP4
We are using the OLEDB provider for sql-server

The Data Provider Or Other Service Returned An E_FAIL Status
When I am retrieving a ADODB recordset with following sql-statement
I sometimes get following error when I do a MOVENEXT statement in this recordset:
‘The data provider or other service returned an E_FAIL status’.


SELECT TOP 100 FROM tableX
WHERE tableX.fieldY IS NULL
ORDER BY PK_tableX

The recordset is read only and disconnected.
It is created with the following properties:

With rst
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockReadOnly
.ActiveConnection = conDB
End With

Set rst.ActiveConnection = Nothing

The database is sql-server 7.0 SP4
We are using the OLEDB provider for sql-server

'Data Provider Or Other Service Returned An E_Fail Status.'
I am using ADO connectoin in my application. My application has Data Grid and it's populated using ADO connection. It works fine in my machine but it gives an error like : 'Data Provider or other Service Returned an E_Fail Status.' , when I try to run in different machine. What could be the problem.

Please advice.
Thanks,
DK

ERROR The Data Provider Or Service Provider Returned An State E_FAIL
I have a Problem, I installed Microsoft Visual Basic 6 and in Some ocations using
adodc or an Recordset Object in the RecordCount an other methods VB return the
next error :

ERROR The data provider or Service Provider returned an state E_FAIL

P.D. This Error occurs in an Spanish Version of VB6 with the Service Pack 5 and 6 in the English version of VB6 with the Service Pack 5 and 6 this problem DON'T OCCUR in my Work only we have the Spanish versión.

Please HELP ME !!!

Data Provider Returned E_FAIL Status.
Hi everyone,

I get an E_FAIL status when executing this piece of code:

Code:
frmNmbHellerExport.mshfU4Records.Rows = frmNmbHellerExport.dcU4Records.Recordset.RecordCount + 1
it only happens when using 'adUseClient'as the CursorLocation

Code:
frmNmbHellerExport.dcU4Records.RecordSource = strSearchFacturen
frmNmbHellerExport.dcU4Records.CursorLocation = adUseClient
frmNmbHellerExport.dcU4Records.LockType = adLockOptimistic
frmNmbHellerExport.dcU4Records.Refresh
The thing is that even while it goes well with 'adUseServer', this option is excluded as the speed reduces about 10 times using this...

I don't know why all of a sudden I receive this error.
The last time I tested it, it worked fine.

This is my select statement:

Code:
strSearchFacturen = "SELECT d.CDDEBITEUR, d.FACTNUMMER, d.FACTDATUM, d.VERVALDATUM1, d.VERVALDATUM2, d.FACTBEDRAG, b.BETKORTPERC, b.KORTINGDAGEN, d.BEDRAGBTW, d.CDBETCOND " & _
"FROM DEBFACTUUR d, BETALINGSCONDITIE b " & _
"WHERE d.CDBETCOND = b.CDBETCOND (+)" & _
"AND d.CDDAGBOEK = 'VF' " & _
"AND d.FACTNUMMER > '" & strSearchFrom & "' " & _
"AND (d.CDDEBITEUR <> 'CREDI' AND d.CDDEBITEUR <> 'DUBDE' AND d.CDDEBITEUR <> 'ECOCH' AND d.CDDEBITEUR <> 'KOERS' AND d.CDDEBITEUR <> 'LECOH' AND d.CDDEBITEUR <> 'RAF' AND d.CDDEBITEUR <> 'RSW') " & _
"ORDER BY d.FACTNUMMER"
I hope someone can help me as I have absolutely no clue.
I searched google but all I find does not apply to me...

Thanks on advance for your time already

Data Provider Returned E_FAIL Status.
Hi everyone,

I get an E_FAIL status when executing this piece of code:
frmNmbHellerExport.mshfU4Records.Rows = frmNmbHellerExport.dcU4Records.Recordset.RecordCount + 1

This is the exact error message:
Run-time error '-2147467259 (80004005)':
Data provider or other service returned an E_FAIL status.

it only happens when using 'adUseClient'as the CursorLocation:
frmNmbHellerExport.dcU4Records.RecordSource = strSearchFacturen
frmNmbHellerExport.dcU4Records.CursorLocation = adUseClient
frmNmbHellerExport.dcU4Records.LockType = adLockOptimistic
frmNmbHellerExport.dcU4Records.Refresh

The thing is that even while it goes well with 'adUseServer', this option is excluded as the speed about 10 times slower using this...

I don't know why all of a sudden I receive this error.
The last time I tested it, it worked fine and since then, no changes were made.

This is my select statement:
strSearchFacturen = "SELECT d.CDDEBITEUR, d.FACTNUMMER, d.FACTDATUM, d.VERVALDATUM1, d.VERVALDATUM2, d.FACTBEDRAG, b.BETKORTPERC, b.KORTINGDAGEN, d.BEDRAGBTW, d.CDBETCOND " & _
"FROM DEBFACTUUR d, BETALINGSCONDITIE b " & _
"WHERE d.CDBETCOND = b.CDBETCOND (+)" & _
"AND d.CDDAGBOEK = 'VF' " & _
"AND  d.FACTNUMMER > '" & strSearchFrom & "' " & _
"AND (d.CDDEBITEUR <> 'CREDI' AND d.CDDEBITEUR <> 'DUBDE' AND d.CDDEBITEUR <> 'ECOCH' AND d.CDDEBITEUR <> 'KOERS'  AND d.CDDEBITEUR <> 'LECOH' AND d.CDDEBITEUR <> 'RAF'  AND d.CDDEBITEUR <> 'RSW') " & _
"ORDER BY d.FACTNUMMER"

Not all fields are indexed and this is on a Pervasive database.

I hope someone can help me as I have absolutely no clue.
I searched google but all I find does not apply to me...

Thanks on advance for your time already,
Ruben

Visual FoxPro6 And VB Still Doesn't Work - "The Data Provider Or Other Service Returned An E_FAIL St
Can anyone tell me why I am getting this error message when trying to connect to a particular Visual Fox Pro 6 table? I only encounter errors when using this table and its associated form. I tried creating a new form, new ADO controls, etc. which worked until until I tried to bind the text boxes to the fields in the database. Should I try re-building the table in FoxPro? Has anyone ever received this message? I am not using Jet as the ODBC driver, I am using Visual FoxPro 6 ODBC driver-is that the problem? If so, why do my other tables and forms work within the same database container...
HELP, PLEASE!!

Data Provider Returned E_FAIL...
I am trying to find a solution to the following problem. The error is 'Data Provider or other service returned an E-FAIL error. Number- 2147467259'. This happens when I add a new record to this table. Everything works fine when I have a small set of records. Currently I have about 24,000 records and the table size is 20M. I am using VFP 6.0 as the back end database and VB 6.0 (SP 5.0). I am using the following code:

Set rsInsert = New ADODB.Recordset
With rsInsert
.CursorType = adOpenDynamic
.LockType = adLockOptimistic
.Open "quotes", gDBConnection, , , adCmdTable
.AddNew 'This is where it throws me out

!QuoteDate = QuoteDate
!PropertyId = PropertyId
!CustomerId = InsuredData.nCustomerId


Thanks in advance.

Plz Help Me With The Error &"Data Provider Or Other Service Returned An E-FAIL Status&"
can anyone tell me what can i do with the error "Data provider or other service returned an E-FAIL status"

Data Provider Error With E_FAIL Status
Hi I am facing a very big and strange problem.
Eveyrthing was working fine till yesterday and all of a sudden today the following error came up when I was trying to use the RecordCount property of one of my recordsets.

"-2147467259 Data provider or other service returned an E_FAIL status."
Moreover in debug mode I am able to check the properties such as BOF and EOF so it means this error comes when I try to access the Recordcount property only.

One more strange thing is that my program works on one of our test database servers and on the other live database server I get this error.
Any help will be appreciated.

Run Time Error '-2147467259 (80004005)'; Data Provider Or Other Service Returned An E
Run time error '-2147467259 (80004005)'; Data provider or other service returned an E_Fail status. someone plz explain this error to me. I get it when i execute the ffg block of code.


Sub LoadPersonalDetails()
Dim cn As ADODB.Connection
Dim rsdet As ADODB.Recordset
Dim sql As String

On Error GoTo LoadPersonalDetails_Error

Set cn = GetConnection

sql = "SELECT * FROM staff WHERE staff.ifkuserid = " & (frmViewUsers.lvUsers.SelectedItem.Text) & ""

Set rsdet = cn.Execute(sql)

If rsdet.RecordCount > 0 Then 'over here the error occurs

Cid = rsdet!StaffID

'Personal details
txtFirstName.Text = IIf(IsNull(rsdet!firstnames), "", rsdet!firstnames)
txtInitials.Text = IIf(IsNull(rsdet!initials), "", rsdet!initials)
txtSurname.Text = IIf(IsNull(rsdet!Surname), "", rsdet!Surname)
txtaddress1.Text = IIf(IsNull(rsdet!vaddress1), "", rsdet!vaddress1)

Visual Basic Data Link E_Fail Status
Hi,
 
 I am trying to access to a Visual FoxPro table using Visual Basic Data Link by an ODBC, I am able to see the DataBase but when I try to access to a table I get the next error message "Data Provider or other service returned an E_FAIL status", I have like 5 tables into the database and some of them I am able to access but the other ones I cannot.

I would really appreciate your help

Thanks

Data Provider E-Fail Status
I'm trying to run an SQL statement and i've got this error message
"Data Provider ot other service returned an E-fail status" i have no idea how to correct this error. I need help!

E_FAIL Status
Hi VB'ers,

I am running a VB program which does a simple query ("grab client name where client number is...") using ADO. It has been working great for about seven months, but since I changed to an XP machine (from '98) - and I don't know if that has anything to do with this issue - I will occasionally get the following error:

Run-Time Error'-2147467259 (80004005)': Data Provider or other service returned an E_FAIL Status

We have the latest ODBC drivers (which have not been changed since before the problem), and I have tried using ActiveX Data Objects 2.5, 2.6, 2.7, and 2.8 to no avail.

After a lot of troubleshooting (including on-line searches) I've not been able to determine why one out of fifty or so client numbers will stop on this error.

If you have any experience with this, please help.

Thanks,

Rich

ADO-E_FAIL Status
hi
Im trying to write a vba program from within Excel that pulls data from a webserver and populates the excel sheet.
So far Im able to connect and retrieve a recordset.But I cant traverse through it..i get this error
Run-Time error -2147467259(80004005):
Data provider or other service returned E_FAIL status.

Code:
rs_query.Open query_url

rs_query.MoveNext

For m = 0 To rs_query.RecordCount

rs_query.MoveNext
Debug.Print m

Next
At the moment it fails when m is 37.I thought that it may be because it cant handle a certain number of records at a time but ive played around with this and it hasnt helped.
Im on windows xp and office 2000 if that helps.

Thanks

E_FAIL Status
I've got an application that has been working just fine for the past year. All of a suddent last friday it starts telling me:

Run-Time Error'-2147467259 (80004005)': Data Provider or other service returned an E_FAIL Status

I open a recordset and the error occurs when I try to display the amount of records returned like:


Code:
Label1.Caption = "Records Found: " & rs.RecordCount

If I take that line out it's fine, but I don't understand why it has a problem with that line and why it started happening now and not before . I've searched and searched for help on this and can't come up with anything that works. Can somebody help please???

What Is E_Fail Status?
what does E_Fail Status mean?

this error occurred when i put this code for my progressbar


VB Code:
if rs.recordcount > 0 then .... end if


it returned such error....

what does it really mean...?
enlighten me please... hehe
i used mysql as my back-end and vb6....
thanks in advance....

E_FAIL STATUS
Hi,

I've got a problem with a recordset in vb6.
When I execute a simple sql statment my recordset returns a E_FAIL status, this is only on my xp system
on a 2000 system it works fine,

I believed it was the cursorlocation, in my connection is on adUseClient, this returns a E_Fail status,
When I set the cursorlocation on adUseServer, my rs.recordCount returned -1 , but my table is not empty !!!

The strange things is that some selections are working just fine.

gtz

Zhite

 

E_Fail Status Error
Can anyone help me out with an e_Fail status error I am getting. I have been banging my head against the wall all afternoon as to why I am getting this. It should be pretty simple. The user should enter a record id into txtBid and then when a command button is clicked a new recordset should be created and filled with the record from the text box.


Code:
Private Sub Command1_Click()
Dim rsmultiplebids As ADODB.Recordset
Set rsmultiplebids = New ADODB.Recordset
rsmultiplebids.CursorLocation = adUseClient
Dim sqlGetBidData As String

If Not txtBid.Text = "" Then
Call corelink

sqlGetBidData = "Select * from core_dedup where BID = '" & txtBid.Text & "'"
MsgBox sqlGetBidData
rsmultiplebids.Open sqlGetBidData, cnCore, adOpenDynamic, adLockPessimistic, adCmdText

cmdSplit.Enabled = True
rsmultiplebids.MoveFirst
Set DataGrid1.DataSource = rsmultiplebids
DataGrid1.Refresh
Else
MsgBox "Please enter a BID to review", vbInformation, "Error"
End If

End Sub
Public Sub corelink()
Set cnCore = New ADODB.Connection
cnCore.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=xxxx;PORT=3306;DATABASE=core; USER=SCA_Terminal;PASSWORD=kevin;OPTION=3;"
cnCore.Open

End Sub

E_FAIL Status *RESOLVED*
I create a recordset with the following SQL statement -

SELECT qrySoilData1.ApplicationNumber, qrySoilData1.ApplicationYear, qrySoilData1.FarmName, qrySoilData1.DateOfApplication, IIf([tblFarmDetails].[Address1]='' Or IsNull([tblFarmDetails].[Address1]),[tblRegister].[Address1],[tblFarmDetails].[Address1]) AS ApplicantName, IIf([tblFarmDetails_1].[Address1]='' Or IsNull([tblFarmDetails_1].[Address1]),[tblRegister_1].[Address1],[tblFarmDetails_1].[Address1]) AS OccupierName, qrySoilData1.AreaOffice, qrySoilData1.Area, qrySoilData1.OSSheetNumber, qrySoilData1.FIDNumber, qrySoilData1.OSNumber, qrySoilData1.AreaOfField, qrySoilData1.NumberOfSamples, qrySoilData1.AreaSampled, qrySoilData1.DateSampled, qrySoilData1.DateSampleToSASA, qrySoilData1.DateResultsReceived, qrySoilData1.FirstApplication, qrySoilData1.SubstituteFields, qrySoilData1.PersonSeen, qrySoilData1.Inspector, qrySoilData1.Permanent, qrySoilData1.SEERADAreaOffice FROM qrySoilData1 INNER JOIN qrySoilData2 ON qrySoilData1.SoilSampleID = qrySoilData2.SoilSampleID

When I try and get RecordSet.Record Count I get the following error - "Data Provider Or Other Service Returned and E_FAIL Status.

I thought it might be a type 'o' but when I coy the SQL statement into my Access 97 database it works fine.


What's wrong?

E_FAIL STATUS Error
Hai

I am working in vb6.0 as front end and visual foxpro 6.o as back end. when i try to create notepad file from the set of records from my table i am getting error like DATA PROVIDER OR OTHER SERVICE RETURNED E_FAIL STATUS?
Can anyone assit me why this is happening and try to give a solution.

Run Time Error: E_FAIL Status
I got a run time error when trying to run a query on a mysql database.

The run-time error number and message is:

-2147467259 (80004005)

Data provider or other service returned an E_FAIL status.


I noticed someone else had posted a thread a while ago on this forum regarding the same issue but the problem was never resolved.

Does anyone know what is causing this error?

Error -2147467259; E_FAIL Status
Greetings;
Using VB6, Access2000.
I'm getting the following error:

Error: -2147467259;
Source: Microsoft Cursor Engine;
Description: Data provider or other service returned an E_FAIL status."

Using the following SQL

Code:
RsSelect_License = _
" SELECT LicenseDriverNo, " & _
" LicenseDriverLastName + ', ' + LicenseDriverFirstName as DriverName, " & _
" LicenseDMVDriverIDNo, LicenseDMVExpirationDate, " & _
" LicenseTLCDriverIDNo, LicenseTLCExpirationDate, " & _
" iif (DATEDIFF(""d"", LicenseDMVExpirationDate, now)>0, " & _
" DATEDIFF(""d"", LicenseDMVExpirationDate, now),0) as DMVNumDays, " & _
" iif (DATEDIFF(""d"", LicenseTLCExpirationDate, now)>0, " & _
" DATEDIFF(""d"", LicenseTLCExpirationDate, now),0) as TLCNumDays " & _
" from " & _
" DriverLicenses " & _
" order by " & _
" LicenseDriverNo, LicenseDriverLastName, LicenseDriverFirstName "
Can someone tell me what's wrong?

Thanks for your response

E_FAIL Status On Field Names
Hi there,

I have a problem, well actually I had one until I did it a different way. But i still don't understand why this was giving me a fail:

.adodatconQueryBuilder.RecordSource = "describe memberlist"
.adodatconQueryBuilder.Refresh
        
For i = 1 To 22
    .cboQueryBuilderFields.AddItem (.adodatconQueryBuilder.Recordset(0))
            .lstQueryBuilderAvailableFieldNames.AddItem (.adodatconQueryBuilder.Recordset(0))
            .adodatconQueryBuilder.Recordset.MoveNext
Next i

The db is Mysql with 22 fields, one of them a primary key. no matter how I set the fields, varchar, tinyint etc I still got this error:

"data provider or other service returned an E_FAIL status"



'mi casa es su casa'
]-=tty0=-[
ICQ:82621399

E_Fail Status When Accessing ADO Recordset
I am trying to open an ADO Recordset based on a Data Shape SQL statement from SQL Server 7.0. This procedure had worked before, but suddenly things are going awry, without any changes.

My code segment follows:

Code:Public sql As New adodb.Connection
Private Sub Command1_Click()
Dim x As Integer, count As Integer, count2 As Integer, SQLP As String, SQLP2 As String, SQLS As String, rst As New adodb.Recordset, mysql As String
Dim rst2 As New adodb.Recordset, fldloop As adodb.Field, Crst As New adodb.Recordset, DateMin As Date, datmax As Date, rstDate As New adodb.Recordset
Dim ACommand As adodb.Command

Dim test As String

sql.Provider = "MSDATASHAPE"
sql.ConnectionTimeout = 100
sql.CommandTimeout = 100
sql.Open "DSN=FreightInvoices", "sa", ""


rst.Open "Select * From tblCustomerstoSupress", sql, adOpenKeyset, adLockReadOnly


count = rst.RecordCount
x = 0


For x = 1 To count
   SQLS = SQLS & "(tblFedExTrackNum.SoldTo LIKE " & "'" & rst![soldto] & "'" & ")"
       If x < count Then
           SQLS = SQLS & " And Not "
       Else: SQLS = SQLS & ")"
       End If
   rst.MoveNext
Next x


SQLP2 = "APPEND({SELECT qryTrackingNumberCharges.TrackingNum, tbl_110_Detail_RatesAndCharges.ChargeCode, " & _
   "tblFedExSpecialChargeCodes.Description, tbl_110_Detail_RatesAndCharges.ChargeAmount " & _
   "FROM qryTrackingNumberCharges " & _
   "LEFT OUTER JOIN tbl_110_Detail_RatesAndCharges ON qryTrackingNumberCharges.InvoiceNumber = tbl_110_Detail_RatesAndCharges.InvoiceNumber " & _
   "AND qryTrackingNumberCharges.LXID = tbl_110_Detail_RatesAndCharges.LXID " & _
   "LEFT OUTER JOIN tblFedExSpecialChargeCodes ON tbl_110_Detail_RatesAndCharges.ChargeCode = tblFedExSpecialChargeCodes.CodeValue " & _
   "GROUP BY qryTrackingNumberCharges.TrackingNum, tbl_110_Detail_RatesAndCharges.ChargeCode, tblFedExSpecialChargeCodes.Description, " & _
   "tbl_110_Detail_RatesAndCharges.ChargeAmount " & _
   "ORDER BY qryTrackingNumberCharges.TrackingNum, tbl_110_Detail_RatesAndCharges.ChargeCode} RELATE TrackingNum TO TrackingNum)"

SQLP = "SHAPE{SELECT qryInvoiceFreightSums.InvoiceNum, qryInvoiceFreightSums.FedExFreight, tblFedExTrackNum.SumOffreight_xinvbox AS MunicsFreight, " & _
       "qryInvoiceFreightSums.FedExFreight - tblFedExTrackNum.SumOffreight_xinvbox AS Difference, tblFedExTrackNum.shipdate_xinvbox, " & _
       "tblFedExTrackNum.TrackingNum, tblFedExTrackNum.itemid_invdet, tblFedExTrackNum.SoldTo, tblNonPrePaidCust.[Customer ID] " & _
       "FROM qryInvoiceFreightSums " & _
       "INNER JOIN qryTrackingNumberCharges ON qryInvoiceFreightSums.TrackingNum = qryTrackingNumberCharges.TrackingNum " & _
       "AND qryInvoiceFreightSums.FedExFreight = qryTrackingNumberCharges.ChargeSum " & _
       "Inner Join tblFedExTrackNum ON qryInvoiceFreightSums.TrackingNum = tblFedExTrackNum.TrackingNum " & _
       "LEFT OUTER JOIN tblNonPrePaidCust ON tblFedExTrackNum.SoldTo = tblNonPrePaidCust.[Customer ID] " & _
       "GROUP BY qryInvoiceFreightSums.InvoiceNum, qryInvoiceFreightSums.FedExFreight, tblFedExTrackNum.SumOffreight_xinvbox, " & _
       "qryInvoiceFreightSums.FedExFreight - tblFedExTrackNum.SumOffreight_xinvbox, tblFedExTrackNum.shipdate_xinvbox, " & _
       "tblFedExTrackNum.TrackingNum, tblFedExTrackNum.itemid_invdet, tblFedExTrackNum.SoldTo, tblNonPrePaidCust.[Customer ID] " & _
       "HAVING (qryInvoiceFreightSums.FedExFreight - tblFedExTrackNum.SumOffreight_xinvbox > 0) " & _
       "AND (NOT " & SQLS & _
       "AND (tblNonPrePaidCust.[Customer ID] Is Null) " & _
       "ORDER BY tblFedExTrackNum.SoldTo, qryInvoiceFreightSums.InvoiceNum} AS ParentRS " & SQLP2


With rst2
   .CursorLocation = adUseServer
   .CursorType = adOpenKeyset
   .LockType = adLockReadOnly
   .ActiveConnection = sql
   .Open SQLP
End With

rst2.ActiveConnection = Nothing


As soon as I get to the Open method for rst2, I receive the "DATA PROVIDER OR OTHER SERVICE RETURNED AN E_FAIL STATUS" error.

I have no clue why this is suddenly happening. It seems to be connected with my use of the DATA SHAPE.

Thanks in advance...help is much appreciated!!!

MySQL Database Problem E_FAIL STATUS
I have a simple point of sale program that I have written that uses VB with mySQL to function. At the end of the day, I print a list of all the items sold that day, but if there are more than ~25 items it will cause an error (E_FAIL STATUS). The error appears to occur during the .Update process before I call the data report. If you need more information to consider this problem, please let me know.

VB6 Using Dataset Object Returned From A Web Service
Hi

I am writing a VB6 program which uses the SOAP toolkit to make a method call
on a Web Service. It all works fine, but the returned data is in the form of
a Dataset, which it seems has no corresponding object in VB6.

I have got as far as working out that a Dataset is actually an XML NodeList,
and even managed to find some code which purports to be able to convert a
Dataset into an ADO Recordset, provided only one table is involved in the
return. Unfortunately this doesn't seem to work as advertised, failing
because the XPath which defines where the table should be found uses an
undefined namespace - I checked the error message on MSDN and found a
suggestion for explicitly setting properties of the DOM document to
reference the namespace in question, but I am not working with a DOM
document, only a standalone NodeList object, and that does not have a
SetProperties method...

Does anyone recognise this scenario, and can anyone offer advice?

Regards

--Jim.

Unexpected HTTP Status Code Returned
When using a SOAP call to vb.NET, I get the following error:

"Unexpected HTTP Status Code Returned (expecting 200, 401, 407 or 500)"

All other SOAP calls work. The SOAP call is as follows:
    ls = SOAPCall(strWebServiceLoc & "/SelectLocationFunctions.asmx", "GetSelectLocation", args, False, strWebServiceLoc)


Help!

How To Get Record Execution Status Returned From Access
Does anyone know how to return the record execution status of an Access query to VB? The ADO execution is done asynchronously with the command object. What I need for example is: "Processing Record 87 of 345"

Thank you!!

Winsock2, Layered Service Provider
Does anyone have insight on this subject?
I'm trying to access extra data on tcp connections and get some etra edge on socket programming.
Anyone have any advices, ideas, thoughts? Please help.
Thanks.

Vb Error -e_fail Status Error
I have an application which is sending faxes by reading
records from Oracle database, passing that records to MS WORD
for allignment and sending through FAX utility(Right Fax->External tool).

This operation will get refresh in every 5 minutes and this application is running on 24*7 basis and if any problem comes, it will write into the Process log file

In long run some times i m getting run time error as "Data Provider or other service returned an E_FAIL status". I m using ADO control (Microsoft ADO Data Control 6.0(SP4) (OLEDB)) to connect the Oracle database. Each time, in each refreshment application is connecting to the database, sending Fax and closing the connection.

Im not clear why this error is coming and it is not coming always!!
Once in while it is giving this error. Why this error is coming...? Is it any ADO acrchitecture problem...? Do i need to upgrade the ADO or OLEDB...? Is there any patches for ADO ?

Pls kindly give your helping hand....

Status On A Service
Hello,
I need to find out if the SQL Server is started on a local machine.

The easiest way to do this seems to be to find out if the service is started or not. The problem is how?

/john

Problems With Data Retrieval From Foxpro: E_FAIL
Hi
so here's what Im trying to do. Just plain vanilla retrieving a field value from a Foxpro DB using an ADO Recordset+Connection over a DSN. Everything seems to be working fine except some records have a weird issue with retrieval. the recordset returned gives me

when I try to do a rs.recordcount. The IsNull shows up as true.But funnilly enough the record actually exists in the DB. I use a tool to run the same SQL query and it shows me the record. So I try to retrieve another field instead of this one. This time it works. So Whats the difference between the two?
One is a numeric(1) and the other is a numeric(2).


anyways here;s coode

visual basic code:--------------------------------------------------------------------------------Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset

With rs
.ActiveConnection = dbConnection
.Source = sSQL
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.Open
End With
--------------------------------------------------------------------------------



ssql="SELECT flu_com From p_preps where prepnum = 12584"
works fine
but
ssql="SELECT conc From p_preps where prepnum = 12584"
gives the error

"Data Provider or Other service returned E_FAIL status"

even though both SQL stmts work fine outside VB and return valid records.
The values for flu_com and conc for this specific record are blank(no value) and 2.3 respectively. Interestingly enough, I think its only happening for some specific record and not all records.

thanks
Udit

Check The Status Of A Service Using Vb
i have a vb app and i need to check to see if the service is running or not. if the service is running the app should continue if not it should send a command to start the serviec. can any one help.

Thanks,
Thomas

Stop A Service And Get Status
How do I stop a windows service? and I also would like to get the status of the service. If its 100 % stopped.
Because I dont want to proceed if the serice is not 100% done.
I could do it like this but this is not a good option for me.
CODERet = Shell("net stop RegSrvc", vbNormalFocus)

Retrieving Status Of Service
I am looking to retrieve the status of a service.
I have the code below but wonder if it could be written better.  Is there an easier way to retrieve the status for a single service than returning a recordset of one and then looping through it?  Seems silly to have to loop through when I KNOW I am only checking a single service.

Here is my current code.  This is modified from a different script I found on the web for toggling a service off then on again.

CODEOption Explicit
Dim objWMIService, objItem, objService
Dim colListOfServices, strComputer, strService
strComputer = "."

'On Error Resume Next
strService = " 'Alerter' "
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\" _
& strComputer & "
ootcimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service Where Name ="_
& strService & " ")
For Each objService in colListOfServices
WScript.Echo objService.State
Next
WScript.Quit

NT Service, NTSVC.OCX And Status
Hi,
I want to create a small application that would run as a service in a server. I have added the NTSVC.OCX control to do this (that is the suggested way of creating VB6 Services). So now I have my application running as a service.
So while is not doing anything my application is "sleeping", but then after 10 seconds my application does a proccess, during this time (from milisec. to a few seconds) my application is "working". Is there an easy way (or a little bit difficult) to check the status of the application (not the one of the service) either if it is "sleeping" or "working"?
I can check the status of the service (running, stopped, etc..) but while the service is running, can I check what is exactly doing at the checking time (sleeping, working")?
Is it a good idea to save the current application-status as a setting (NTService1.SaveSetting) and modify this info according with the application and everytime the user wants to retrieve the application-status use the QueryServiceConfig Api? Does it suffer much the Service Control Manager, changing the settings of a service every second?
Thanks for your feedback.
Jaime.

No Data Being Returned
I know this is not a VB question but could anyone help with the qury posted here;

http://www.vbforums.com/showthread.p...hreadid=231588

any help would be appreciated.

Convert Data Returned By GetChunk
Hello all,

I've got a database field, Long Raw, that holds tons of data points. Each point is a double (or 8 bytes). When I use the GetChunk method it returns each byte as an element in an array. Does anyone know a quick way to convert these 8 bytes back into a single double?

The code I have now works but I'd like to see if there are any other options.

The current code uses two user defined types, one of byte data type (BUDT) and one of double data type (DUDT). The GetChunk populates BUDT then an LSET is used to reassign BUDT to DUDT which effectively converts. The issue I'm running into is that I can't assign BUDT directly using GetChunk. I have to assign to a temporary var then loop over the array reassigning the values to the BUDT.

Any ideas are greatly appreciated.

Thanks in advance,
Aron

Parameter Passing No Data Returned HELP!!
When I run my crystal report from vb6 using .dsr with code below I get no records returned.


Code:
Dim Report As CrystalReport1


Private Sub Form_Load()


Set Report = New CrystalReport1

PropTitle = FrmUtilities.TxtPropHeading.Text
ClsTitle = FrmUtilities.TxtClsHeading.Text
StClsTitle = FrmUtilities.TxtStClsHeading.Text
RoutTitle = FrmUtilities.TxtRoutHeading.Text
AcctTitle = FrmUtilities.TxtAcctHeading.Text
ResValTitle = FrmUtilities.TxtResValHeading.Text
ComValTitle = FrmUtilities.TxtComValHeading.Text
MapBlkTitle = FrmUtilities.TxtMapBlkHeading.Text
ClientTitleName = FrmUtilities.TxtClientName.Text
Eff_DOV_Date = FrmUtilities.TxtEffDate.Text
If ParmsArray(4) = "1" Then
InspectionWitness = "1"
Else
InspectionWitness = "0"
End If

If TypeOfReport = "R" Or TypeOfReport = "C" Then
If ReportKey = "1" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and ({BASE.ACCOUNT_NO} in {?FirstPart} to {?SecondPart})"
Else
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and ({BASE.ACCOUNT_NO} like {?FirstPart})"
End If
ElseIf ReportKey = "2" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and ({BASE.MAP_BLK_LOT} >= {?FirstPart} AND {BASE.MAP_BLK_LOT} <= {?SecondPart})"
Else
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and {BASE.MAP_BLK_LOT} LIKE {?FirstPart}"
End If
ElseIf ReportKey = "3" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and ({BASE.ROUTING_NO} >= {?FirstPart} AND {BASE.ROUTING_NO} <= {?SecondPart}) "
Else
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and {BASE.ROUTING_NO} LIKE {?FirstPart}"
End If
ElseIf ReportKey = "4" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and ({BASE.SORT_PROPERTY_LOC} >= {?FirstPart}) AND ({BASE.SORT_PROPERTY_LOC} <= {?SecondPart})"
Else
SelctFor = "({BASE.LCI} = {?TypeOfReport}) and {BASE.SORT_PROPERTY_LOC} LIKE {?FirstPart}"
End If
End If
Else
If ReportKey = "1" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.ACCOUNT_NO} in {?FirstPart} to {?SecondPart})"
Else
SelctFor = "({BASE.ACCOUNT_NO} like {?FirstPart})"
End If
ElseIf ReportKey = "2" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.MAP_BLK_LOT} >= {?FirstPart} AND {BASE.MAP_BLK_LOT} <= {?SecondPart})"
Else
SelctFor = "{BASE.MAP_BLK_LOT} LIKE {?FirstPart}"
End If
ElseIf ReportKey = "3" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.ROUTING_NO} >= {?FirstPart} AND {BASE.ROUTING_NO} <= {?SecondPart}) "
Else
SelctFor = "({BASE.ROUTING_NO} LIKE {?FirstPart}"
End If
ElseIf ReportKey = "4" Then
If FirstPart <> SecondPart Then
SelctFor = "({BASE.SORT_PROPERTY_LOC} >= {?FirstPart}) AND ({BASE.SORT_PROPERTY_LOC} <= {?SecondPart})"
Else
SelctFor = "({BASE.SORT_PROPERTY_LOC} LIKE {?FirstPart})"
End If
End If
End If




Report.RecordSelectionFormula = SelctFor
Report.ParameterFields(1).SetCurrentValue PropTitle
Report.ParameterFields(2).SetCurrentValue AcctTitle
Report.ParameterFields(3).SetCurrentValue ClsTitle
Report.ParameterFields(4).SetCurrentValue StClsTitle
Report.ParameterFields(5).SetCurrentValue RoutTitle
Report.ParameterFields(6).SetCurrentValue ResValTitle
Report.ParameterFields(7).SetCurrentValue ComValTitle
Report.ParameterFields(8).SetCurrentValue MapBlkTitle
Report.ParameterFields(9).SetCurrentValue SecondPart
Report.ParameterFields(10).SetCurrentValue FirstPart
Report.ParameterFields(11).SetCurrentValue ReportKey
Report.ParameterFields(12).SetCurrentValue TypeOfReport
Report.ParameterFields(13).SetCurrentValue ClientTitleName
Report.ParameterFields(14).SetCurrentValue Eff_DOV_Date
Report.ParameterFields(15).SetCurrentValue InspectionWitness

'Report.DiscardSavedData


CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Me.Show
Screen.MousePointer = vbDefault

End Sub
If I uncomment the command to DiscardSavedData and execute...the prompting window comes up for me to supply the parameters then I get the desired results. I don't understand what I'ved done wrong. I know that the discard saved data will erase any parameter fields values I have given the report but what about when I supply those parameters...I get no returned records??? All of my variables used to supply parameter fields for the report were defined as string and set as global variables when the application first starts. Despartely seeking a solution! This has frustated me for two days now. Please help! Thanks in advance.

The Size Of Data Returned By An SQL Query...?
If I do:

Code:
SELECT * FROM tblSmallGogs

Then how can I work out how much data is being sent across the network to my SQL Server Client?

I need the answer is bytes or Mbytes...

Woka

Testing Variant For Data Returned
Hi,

I have a function that either returns Empty (in case of error) or a 2 dimensional array (returns a Variant type). I want to test for the error however when I do the following:

Dim vReturn as Variant
vReturn = MyFunction()
if (vReturn = Empty) then

I get a runtime error of type mismatch. How do you properly test a variant type in VB?

Thanks in advance.

MechEngCoder

How To Access DLL Data By Pointer Returned?
A C++ DLL contains a function PBYTE GetDataPtr(). The value returned
is a pointer to a set of byte data. How can I access the data in VB?

Hierarchial Returned Recordset Data Issue
Here is my code:

CODE            szSQL1 = "SELECT DISTINCT [Age] FROM Master " & _
            "WHERE [Type] = 'CAMPER' ORDER BY [Age] ASC"
            szSQL2 = "SELECT [First Name], [Last Name], [Age] FROM Master WHERE [Type] = 'CAMPER' " & _
            "ORDER BY [Age] ASC, [Last Name] ASC, [First Name] ASC"
            szSQLShape = "SHAPE {" & szSQL1 & "} AS rsMaster " & _
            "APPEND ({" & szSQL2 & "} RELATE [Age] TO [Age]) AS rsDetail"
            rs.Open szSQLShape, connRpt
            If rs.BOF = True And rs.EOF = True Then
                MsgBox "No records matched your search criteria!", vbCritical
                rs.Close
                Exit Sub
            End If
            Set drCamperAge.DataSource = rs
            drCamperAge.WindowState = vbMaximized
            drCamperAge.Show vbModal
            Set drCamperAge = Nothing
            rs.Close

Sorting Data Returned From A Subreport In Crystal Reports 9
I've got a report that passes parameters over to a subreport as the report is being generated and the subreport returns data to the main report based on the parameters it receives. So the subreport acts like a function that I'm calling for each record in the main report.

Before the report is generated, I want to give the user the ability to sort by the column that displays the subreport data for each record.

I tried passing the data from the subreport in a shared variable to a formula in the main report then sort by the name of that formula like so...

Report.RecordSortFields.Add .FormulaFields.GetItemByName("myFormula"), crAscendingOrder

It didn't work but it didn't return any errors. I don't think it worked because the subreport data is generated on the fly so I'm guessing I would need to tell it to sort after the report has been generated. Is this even possible or am I going about this all wrong?

Vb Code For Manipulating Multiple Record Data Returned From PL/SQL
Hi
I have a oracle stored procedure which returns a
TABLE of NUMBERS(100) ie (defined as OUT) in PL/SQL

can any one help me to call the procedure and store the returned value in visual basic 6 so that i can manipulate the same .
I use ADODB , & ORALCE PROVIDER FOR OLEDB for connection

what are the different ways I can call this stored procedure to return the above data ?

Thanks.

What's The Meaning Of Provider: Bd.Open "Provider=Microsoft.Jet.OLEDB.4.0;...
set bd = new ADODB.Connection
bd.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:d1.mdb;Persist Security Info=false"




What's the meaning of Provider?
How it'll work in the case of Sybase or Oracle DB?

Thanks in advance.

Copyright © 2005-08 www.BigResource.com, All rights reserved