Solved

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

Posted on 2003-10-28
5
1,085 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
Comment Utility
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
Comment Utility
0
 
LVL 1

Author Comment

by:Thor_DK
Comment Utility
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
Comment Utility
PAQed, with points refunded (250)

Computer101
E-E Admin
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
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…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now