楼上大哥能不能说详细点?用两个connection怎么联接.

解决方案 »

  1.   

    不要叫我大哥啊!!我想你能不能用两个connection连接,就是说一个连接远程SQL,一个连接本地ACCESSDim SqlCn as new adodb.connection
    dim AcsCn as new adodb.connection
    dim Sqlrs as new adodb.recordset
    dim Acsrs as new adodb.recordset
    SqlCn.Open "Driver={Sql Server};Server=xxx.xxx.xxx.xxx;uid=sa;Pwd=xxx;Database=Database"
    AcsCn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & App.Path & "\database.mdb"
    Sqlrs.open "select * from fields",Sqlcn,1,1
    Acsrs.open "select * from fields",Asccn,1,1
    我的想法就是这样,,不知道我有没有理解错!!:)
      

  2.   

    用sqlserver 提供的分布式查询
      

  3.   

    先从sqlserver download到本地access。然后本地查询---------------------------------------------------------
    Montaque==Digitalboy==Houyongfeng==Monkey
      

  4.   

    pcfanshome(冰山·崩溃中)小弟:
    很显然你误会我的意思了.
    我不是说怎么连接,而是联接.一字之差,但意思不一样的.
    我的意思是怎么对远程的和本地的数据库进行联接查询,或者不做联接查询,只要能查询单据列表时里面的基本资料不要显示代码,而显示友好的名称.
    怎么做?
      

  5.   

    你可以在access中建立远程连接,性质跟vfp中的远程视图差不多。建立连接之后。你就可以在access操作sql中的数据就像操作本机一样。
    一定行我试过。记得给分噢!
      

  6.   

    那比如你要查SQL的"id"字段哪个跟ACCESS字段一样的话可以这样写啊sql="select * from fields where id=" & acsrs("id")
      

  7.   

    to  kingbear2000(相信自己)  :
       在access中如何建立远程连接?