Private Sub DefineData()
   Dim cmd As ADODB.Command
    Call dbconn(conn)
    Set cmd = New ADODB.Command    
    cmd.CommandType = adCmdText
    If blnAllFlowLineID Then
        cmd.CommandText = "Exec Buildt_CarrierNote -1"
        TabName = "t_CarrierNote"
        cmd.Execute
    Else
        cmd.CommandText = "Exec Buildt_CarrierNote " & glngFlowlineID
'
        TabName = "t_CarrierNote_FL_" & glngFlowlineID
        cmd.Execute
    
    End If
    
原数据库SQL格式连接,现在改变为oracal,在上述代码红色位置出错,请大家帮忙看看.这个存储过程应该换成什么样的表达才可以执行,谢谢.

解决方案 »

  1.   

    Private Sub GetRs()
        Call dbconn(conn)
       
                
        Set rsOrders = conn.Execute("exec pr_WrongOrders " & VisualFlowLine.flowlineid)    Set rsOrderDetails = rsOrders.NextRecordset
    End Sub
    Private Sub DropTempTable(ByVal TempTab As String)
        Dim cmd As ADODB.Command
        Call dbconn(conn)
        Set cmd = New ADODB.Command
        Set cmd.ActiveConnection = conn
        cmd.CommandType = adCmdText
        cmd.CommandText = " IF EXISTS " & _
                          " (SELECT NAME FROM dbo.sysobjects WHERE name = '" & TempTabName & "') " & _
                          " DROP TABLE " & TempTabName
        cmd.Execute
        Set cmd = Nothing
    End Sub
    还有上面的两个SQL问题,都是格式不对,希望大家帮忙一起看看