If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > data from linked server in ASP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-02-04, 10:00
jayDBF jayDBF is offline
Registered User
 
Join Date: Aug 2002
Location: Beaumont, TX
Posts: 18
data from linked server in ASP

Hi Everyone,
I've linked the Pervasive SQL database to MS SQL Server using Linked server. There is one matching field in both the tables. I need help with the code to access the table from the linked server tables. I tried some queries but getting errors. Please see what am I doing wrong.

I tried the following code just to get data from the linkedserver, not even from both the tables and getting error saying Invalid object name:

Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = EMMS; User Id = sa; Password=sqladmin"
Set MyRec = Server.createobject("ADODB.Recordset")
MyRec.Open "SELECT * FROM LinkServer.DBCLN.dbo.cdtbl1",MyConn

For the above code, I get the following error in the page:
---------------------------------------
Microsoft OLE DB Provider for SQL Server error '80040e14'

OLE DB error trace [Non-interface error].

/emms/dbpervasive.asp, line 7
---------------------------------------

Thanks,
Jay.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On