Solved

Linked Server: Using Four Part Syntax

Posted on 2006-06-26
8
375 Views
Last Modified: 2010-05-18
I have tried the "Four Part Syntax" and it fails.
However, the standard "openquery" technique works great.

For example, as displayed in this article:
http://www.aspfree.com/c/a/Microsoft-Access/Configuring-a-Linked-Microsoft-Access-Server-on-SQL-2005-Server/4/

select * from openquery(AccessDB, 'select * from employees')  '<< works fine (openquery method)

select * from AccessDB...Employees '<< fails (4 part syntax method)

Is this typed correctly?

Thanks.



0
Comment
Question by:born4code
8 Comments
 
LVL 13

Expert Comment

by:MikeWalsh
ID: 16989063
select * from [AccessDB].DatabaseName.DBO.Employees

I am assuming that AccessDB is your linked server?
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16989917
Both should work, but I always prefer the OpenQuery method as it is more flexible to solve a certain amount of problems.
now, when you say it fails, what is the error message?
0
 
LVL 2

Author Comment

by:born4code
ID: 17075854
Sorry it took so long for me to get back.  I was on vacation.

Okay... the AccessDB is the name of the linked server.
Let me go and check the error message.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 2

Author Comment

by:born4code
ID: 17085711

Statement was: select * from AccessDB...select * from myTable
Also tried: select * from AccessDB.MainDatabase.dbo.myTable

Error Code is:

OLE DB provider "SQLNCLI" for linked server "AccessDB" returned message "Unspecified error".
OLE DB provider "SQLNCLI" for linked server "AccessDB" returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.".
Msg 7311, Level 16, State 2, Line 3
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "AccessDB". The provider supports the interface, but returns a failure code when it is used.
0
 
LVL 2

Author Comment

by:born4code
ID: 17334061
Obviously there are no solutions provided in this thread that work.
Please close.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 500 total points
ID: 17374316
>>Please close.<<
This is how it works here (from the EE Help):

Nobody answered my question. What do I do?
http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/help.jsp#hi71
0
 
LVL 2

Author Comment

by:born4code
ID: 17381092
Interesting... and definitely some more work to do.

Before you ask the Moderators to help you in this circumstance, take the time to post a message in your question stating your intention to have the question deleted or closed, and make sure you have responded to all of the Experts' comments. Then post a question in the Community Support topic area asking the Moderators to delete your question. Remember to post a link to the original question in your request. If there are no comments in the question, one of the Moderators will delete the question. If there are comments, the Moderator will post notice of your request, and will give the participants 96 hours to object. You may be required to post your reason for asking for the deletion, and objections will be taken into account.

I learned more from this than the question results.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17381899
While I appreciate the points, they are not meritted, please see here (also from the EE Help):

I accepted the wrong answer. Now what?
http://www.experts-exchange.com/help.jsp#hi17
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

773 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