Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Using Dataset, odbcdataAdapter Post Reply Post New Topic
Author Message
salaikumar
Newbie
Newbie


Joined: 16 Nov 2007
Online Status: Offline
Posts: 4
Quote salaikumar Replybullet Topic: Using Dataset, odbcdataAdapter
    Posted: 16 Nov 2007 at 6:46am
Hello
i have a problem in the foll code. I am trying to pass a sql query to a report(CRXI r2). But the dataset in the foll code returns null i suppose. the error message(inner exception) is given below..
 

Dim odbcAdapter As New OdbcDataAdapter()

odbcAdapter.SelectCommand = New Odbc.OdbcCommand(StrSql, OpenSQLConnection)

MessageBox.Show(odbcAdapter.SelectCommand.CommandText)

odbcAdapter.Fill(objds, "testtable)

objReport.SetDataSource(objds)

objClsCrystalRptVw.ReportSource = objReport

error message:
{"Object reference not set to an instance of an object."}
 
can anyone help me
 
IP IP Logged
TomN
Newbie
Newbie


Joined: 22 Jan 2008
Location: Australia
Online Status: Offline
Posts: 3
Quote TomN Replybullet Posted: 22 Jan 2008 at 4:43pm

I do not see you create dataset 'objds' in the code!

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.