TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Kanhialal kk
NA
234
338.7k
error in odbc data provider
Sep 1 2012 4:32 AM
Hi..
I am working on desktop application with sql server 2000 database i am using ADODB for database connection.
but when i run project i am getting following error.
System.NullReferenceException was unhandled
Message: Object reference not set to an instance of an object.
code is bellow
this.combo1.Items.Clear();
this.combo1.Text = "Select";
if (!this.optinvoice.Checked)
return;
this.gbdate.Visible = false;
this.gbname.Visible = true;
this.gbname.Text = "By Invoice#";
this.adodc1.CommandType = CommandTypeEnum.adCmdText;
this.adodc1.RecordSource = "select serial from purchase_invoice";
this.adodc1.Refresh();
if (this.adodc1.Recordset.RecordCount <= 0)
return;
this.adodc1.Recordset.MoveFirst();
for (this.cnt = 1; this.cnt <= this.adodc1.Recordset.RecordCount; ++this.cnt)
{
this.combo1.Items.Add(this.adodc1.Recordset.get_Collect((object)0));
this.adodc1.Recordset.MoveNext();
}
while same code in framework 1.1 working nice..
Reply
Answers (
0
)
Read header row in datatable into combobox
How to run application without login in windows 2003 server ?