Solved

View causes "Data provider or other service returned an E_FAIL status" and "Connection Failure"

Posted on 2003-10-28
5
1,089 Views
Last Modified: 2007-12-19
Every time I call the simple view below from the database window I get the first screen with the result.
But when I try to go to the next page using the PageDown key I get an error message:

Data provider or other service returned an E_FAIL status

and after that the content of all records are blanked and after a second I get another error message

Connection Failure

I have to close the projekt to be able to se any view. All other views and stored procedures works without errors.

SELECT tblAdresse.Fornavn, tblAdresse.Efternavn,
    tblAdresse1.Firma, tblAdresse1.Adresse,
    tblAdresse1.Adresse2, tblAdresse1.Postnummer
FROM dbo.tblAdresse INNER JOIN
    dbo.tblTjenestested ON
    dbo.tblAdresse.AdresseID = dbo.tblTjenestested.PersonID INNER
     JOIN
    dbo.tblAdresse tblAdresse1 ON
    dbo.tblTjenestested.TjenestestedID = tblAdresse1.AdresseID

The project is on a Windows 2000 pc with Access 2000 adp project-file running up against a MS SQL server Enterprise Edition version 8.00.194 (RTM) running MS Windows 2000 (5.0 2195).  BTW I use MDAC version 2.60.6526.2
0
Comment
Question by:Thor_DK
  • 2
5 Comments
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9638580
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9638590
0
 
LVL 1

Author Comment

by:Thor_DK
ID: 9640476
Thanks a lot, but none of the two suggestions apply to the solution of the problem.
But I've just found the solution.

Table tblAdresse is used twice in the SQL statement - the second version is called tblAdresse1.
This seems to confuse the SQL server. So after adding a new view (viewAdresse) that's just all records in tblAdresse and replacing the secord version the view works fine.

So the final SQL statement now looks like this

SELECT tblAdresse.Fornavn, tblAdresse.Efternavn,
    viewAdresse.Firma, viewAdresse.Adresse,
    viewAdresse.Adresse2, viewAdresse.Postnummer
FROM dbo.tblAdresse INNER JOIN
    dbo.tblTjenestested ON
    dbo.tblAdresse.AdresseID = dbo.tblTjenestested.PersonID INNER
     JOIN
    dbo.tblAdresse viewAdresse ON
    dbo.tblTjenestested.TjenestestedID = viewAdresse.AdresseID

I wonder if is a Server bug, or because I'm using an illegal SQL statement that passes the SQL check.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9663392
PAQed, with points refunded (250)

Computer101
E-E Admin
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question