Jover(Java):谢谢老兄!!我又可以up了

解决方案 »

  1.   

    Set Q_Cnn = New ADODB.Connection
    Q_StrCnn = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=" + CurDir() + "\*.mdb"
    Q_Cnn.Open Q_StrCnn
    Set J_Comman = New ADODB.Command
    J_Comman.ActiveConnection = Q_Cnn
    J_Comman.CommandTimeout = 300
    J_Comman.commandtext="delete [1].* from [2] where [1].[1]=[2].[2]"
    J_Comman.Execute
      

  2.   

    Dim x As New ADODB.Connection
    x.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\XXX.mdb;Persist Security Info=False"
    'x.Execute "SELECT * INTO [D:\Target.mdb].[CopyOfTable1] FROM [D:\Source.mdb].[Table1]"
    x.Execute "INSERT INTO [D:\Target.mdb].[CopyOfTable1] SELECT * FROM [D:\Source.mdb].[Table1]"
      

  3.   

    playyuer(女㊣爱):斑竹!!!!!谢谢了!!!!!!!!
    tianao0001(莱因哈特):谢谢了!兄弟!!!!!
      

  4.   

    playyuer(女㊣爱):如果我有一个sql server2000 的数据库。还有一个access数据库!用odbc连接好了.我想把数据从access数据库发送到sql server 2000中!应该怎么写1!!!??
    紧急!!!一定给分!!
    还有那位大虾看到了!!帮帮忙!!!!
      

  5.   

    Jneu(沧海桑田):帮帮忙···谢谢了1!!!
      

  6.   

    '请翻旧贴
    Dim adoConnectionX As New ADODB.Connection
    adoConnectionX.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Data Source=YourServerName;DataBase=YourDatabaseName"
    adoConnectionX.Execute "SELECT * INTO [TableOfSQL] FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=..\..\XXX.mdb')...[TableOfAccess]"
    adoConnectionX.Execute "INSERT INTO [TableOfSQL] SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=..\..\northwind.mdb')...[TableOfAccess]"
      

  7.   

    为什么系统说找不到 我要插入数据的那个表,在sql server中?/
    我的表在那里!!1
      

  8.   

    playyuer(女㊣爱):我也没有找到旧帖!!谢谢斑竹帮助!!
      

  9.   

    为什么系统说找不到 我要插入数据的那个表,在sql server中?/
    我的表在那里!!1 
      

  10.   

    你把你的程序贴出来!
    参阅:
    http://msdn.microsoft.com/library/en-us/tsqlref/ts_oa-oz_2be1.asp 关于SQL和ACCESS的导入导出问题
    http://www.csdn.net/expert/topic/298/298892.shtm
      

  11.   

    Public Sub sendInfo()
       Dim rsDeclCode As New ADODB.Recordset   
       Dim StrSql As String
       Dim path As String   path = App.path   If Right(path, 1) <> "\" Then path = path & "\"
       If rsDeclCode.State = adStateOpen Then rsDeclCode.Close
       StrSql = "select decl_no from t_goods_decl where decl_date>=#" & Date - 30 & "#  and decl_date <= # " & Date & " # and decl_no like '210%'"
        Do While Not rsDeclCode.EOFconOraDestination.Execute "SELECT * into [t_fee_list]  FROM opendatasource('microsoft.jet.oledb.4.0','data source=f:\temp.mdb').[t_fee_list]"conOraDestination.Execute "INSERT [t_fee_list] SELECT * FROM opendatasource('microsoft.jet.oledb.4.0','data source=f:\temp.mdb').[t_fee_list]" & _
                          "where decl_no='" & rsDeclCode!decl_no & "'" rsDeclCode.MoveNextLoopend sub系统提示:错误的表名 t_fee_list
    这是怎么回事???
      

  12.   

    opendatasource('microsoft.jet.oledb.4.0','data source=f:\temp.mdb')...[t_fee_list]" 
    应该是 "..." 3 个"黑点"儿
      

  13.   

    playyuer(女㊣爱):这个我也试过了!还是原来的错误!我该怎么办???
      

  14.   

    cmm.commandtext="insert......."
    cmm.commandtype=Proc....   (具体的我记不清了。你自己查一下吧,VB有提示的)
    cmm.execute
      

  15.   

    程序执行到conOraDestination.Execute "SELECT * into [t_fee_list]  FROM opendatasource('microsoft.jet.oledb.4.0','data source=f:\temp.mdb').[t_fee_list]"
    报错!ad hoc access to oledb provider 'microsoft.jet.oledb.4.0' has been denied.you must access this provider through a linked server.
    这是个什么错误???
      

  16.   

    SELECT * into [t_fee_list]  FROM opendatasource('microsoft.jet.oledb.4.0','data source=f:\temp.mdb')...[t_fee_list]Copy 到 Query Analyzer 测试!
      

  17.   

    OLE DB provider 'microsoft.jet.oledb.4.0' reported an error.  
    [OLE/DB provider returned message: 'f:\temp.mdb' is not a valid path.  Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.]
    这就是测试结果!我找了!在f:\有temp.mdb数据库!这又是怎么会事情呢?
    playyuer(女㊣爱):能不能再帮帮忙!
      

  18.   

    To:lzy5042(老山) 
    我用"Provider=Microsoft.Jet.OLEDB.3.51;Data Source=数据库名(*.mdb)"
    当我打包安装时出错:“未找到提供者,可能为未被正确安装”
    我的VB是正版的,打包应该没有问题啊!
    能帮帮我吗?
      

  19.   

    ONnet():你要安装一个mdac2.6 去微软的网站上去找!
    或者去打个补丁!vb6.0的补丁!
      

  20.   

    这些我都安装了(sp5.0),没有用啊!我这里好几台机都是这样(目标机没有安装VB),现在我应该怎么办呢?
      

  21.   

    playyuer(女㊣爱) :我努力的尝试,结果是这个错误!我一定给分,还请给位高手鼎力相助!!could not use "; ,file already in use这是怎么会事情呢???
    我查找了,可是不知道是什么错误!!帮帮忙!!!
      

  22.   

    playyuer(女㊣爱):程序出错!!
    系统提示:privider returned message unspecified error
    就是在执行完:adoConnectionX.Execute "INSERT INTO [TableOfSQL] SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=..\..\northwind.mdb')...[TableOfAccess]" 以后!!!!该怎么办?????
      

  23.   

    lzy5042(老山)帮我一把!!!
    你用"Provider=Microsoft.Jet.OLEDB.3.51;Data Source=数据库名(*.mdb)"
    是怎么打包安装到目标机的!!!
      

  24.   

    ONnet():这个问题我好像遇到过!我给你试一下!!!现在就打一个包!!!