Guest_imported
New member
- Jan 1, 1970
- 0
I try to link report to Oracle databse, but I can't do it.
Can someone explain what's wrong with following code ?
The MsgBox always return 0 .
Dim Report As New CrystalReport1()
Private Sub FrmReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WindowState = FormWindowState.Maximized
Dim sConn As String = "Provider=MSDAORA.1;User ID=baseID;Password=basePass;Data Source=Base"
Dim sSql As String = "select * From Tab"
Dim Conn As New OleDbConnection(sConn)
Conn.Open()
Dim AD As New OleDbDataAdapter(sSql, Conn)
Dim DS As New DataSet()
AD.Fill(DS, "Tab"
Report.SetDataSource(DS)
MsgBox(Report.Database.Tables.Count)
Conn.Close()
End Sub
Can someone explain what's wrong with following code ?
The MsgBox always return 0 .
Dim Report As New CrystalReport1()
Private Sub FrmReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WindowState = FormWindowState.Maximized
Dim sConn As String = "Provider=MSDAORA.1;User ID=baseID;Password=basePass;Data Source=Base"
Dim sSql As String = "select * From Tab"
Dim Conn As New OleDbConnection(sConn)
Conn.Open()
Dim AD As New OleDbDataAdapter(sSql, Conn)
Dim DS As New DataSet()
AD.Fill(DS, "Tab"
Report.SetDataSource(DS)
MsgBox(Report.Database.Tables.Count)
Conn.Close()
End Sub