Invalid Table Name

Invalid Table Name

am 15.12.2005 07:58:18 von Vin Rao

--0-1952537574-1134629898=:96201
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Hello experts,


I have a problem saying CrystalDecisions.CrystalReports.Engine.InvalidArgumentExcept ion: Invalid column name when i want to view a report using MYSQL 5.0 database.

The code looks like this

Imports System
Imports MySql.Data
Imports MySql.Data.MySqlClient
Imports System.Data
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.CrystalReports.Engine.Tables

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim myReport As New ReportDocument

Dim mycon As MySqlConnection
Dim mycmd As MySqlCommand
Dim myda As MySqlDataAdapter
Dim myds As New DataSet

mycon = New MySqlConnection("Server=localhost;database=wvts;uid=root;pwd =sakith")
' mycmd = New MySqlCommand("Select * from test", mycon)' where test is my table name with columns col1 and col2
mycon.Open()
myda = New MySqlDataAdapter("Select * from test", mycon)
myda.Fill(myds, "test")
'myReport.Load(".\TestCrystalReport.rpt")
myReport.Load("C:\Inetpub\wwwroot\WVTS\TestCrystalReport.rpt ")
'myReport.Database.Tables(8).SetDataSource(myds.Tables(8))
myReport.Database.Tables("test").SetDataSource(myds.Tables(" test"))
myReport.SetDataSource(myds)
CrystalReportViewer1.ReportSource = myReport
mycon.Close()
End Sub


Please help me out with this
Thanks
Vin



---------------------------------
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
--0-1952537574-1134629898=:96201--