Results 1 to 1 of 1
  1. #1
    Join Date
    Aug 2002
    Beaumont, TX

    Unanswered: data from linkedserver using 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

    Last edited by jayDBF; 07-30-04 at 18:22. Reason: better undestanding

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts