Solved

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

Posted on 2003-10-28
5
1,090 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 15

Expert Comment

by:namasi_navaretnam
ID: 9638580
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

734 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