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
lynn tan
NA
12
0
Object reference not set to an instance of an object.
Jun 20 2006 11:59 PM
hi can someone please help me with this.. i kept getting this error Object reference not set to an instance of an object. i am just beginning to write my first program and still learning.. i know that i have to instantiate my dataset and i guess i did instantiate.. the coding is as follows public static DataSet ds; private void BtnLogin_Click(object sender, EventArgs e) { CustomerMS.localhost.Service1 cms = new CustomerMS.localhost.Service1(); ds = cms.GetUserInfo(txtUser.Text.Trim(), txtPwd.Text.Trim()); uid = txtUser.Text.Trim(); pwd = txtPwd.Text.Trim(); if ((int)ds.Tables["Check User"].Rows[0].ItemArray[0] > 0) { this.Hide(); frmMain main = new frmMain(); main.Show(); } else { MessageBox.Show("You didnt enter the right User ID or Password", "Invalid User ID or Password", MessageBoxButtons.OK, MessageBoxIcon.Error); } } and i am using web services and when i tried to retrive the data direct via web services i get the correct data but when i tried to retrive via my client, i saw the ds.tables have the Data in it but in ds.tables["check user"] it just shows null. whats going on? please help..
Reply
Answers (
11
)
IEnumerator not reset?
printing reporting services