none
急求:代码修正 RRS feed

  • 问题

  • 我用VB.net调用SAS存储程序,想将生成的SAS数据集result用VB.net 读入并通过datagridview显示在VB界面上
                Dim cn As OleDb.OleDbConnection = New OleDb.OleDbConnection()
                cn.ConnectionString = "Provider=sas.IOMProvider; Data Source=_LOCAL_"
                Dim cmd As OleDb.OleDbCommand = cn.CreateCommand()
                cmd.CommandType = CommandType.TableDirect
                cmd.CommandText = "libname mylib.result."
                Dim reader As OleDb.OleDbDataReader = cmd.ExecuteReader()
                Dim obAdapter As New System.Data.OleDb.OleDbDataAdapter("select * from mylib.result", "provider=sas.iomprovider.1; SAS Workspace ID=" + obsas.UniqueIdentifier)
                Dim obDS As New DataSet()
                obAdapter.Fill(obDS, "sasdata")
                DataGridView1.DataSource = obAdapter
    但是一直提示说未处理OleDbException <?xml version="1.0" ?><Exceptions><Exception><SASMessage severity="Error">没有分配逻辑库引用名“LIBNAME”。</SASMessage></Exception></Exceptions>
    急求各位高手帮忙修改!非常感谢!
    2012年6月14日 16:02

答案