Please help - .Net problem

  • Thread starter Thread starter Edb
  • Start date Start date
E

Edb

Hi Everyone,
I have been researching this for days. Brain is
simply without any excitement on this.

I have a Login page in .Net. It does see my Username and
Password in SQL and transfers me to the next page.

I need to grab 2 fields (FirstName / Lastname) based on
the Username and Password and place it into a Label.

The Label name is lbl_manager and thought this was going
to work but it does not.

lbl_manager.text = ds.Tables("Return_Set").Rows(0).Item
("BD_Mgr_Fname") & ds.Tables("Return_Set").Rows(0).Item
("BD_Mgr_lname")

I get this error "Object refernce not set to an instance
of an object".

Please help :)
thx,
Ed
 
Check the spelling of your table names and columns. Using named columns
probably isn't the best way to go about this..but you need help not a
lecture.

Debug.Assert the fields first, it'll blow up I'm guessing. It's got to be
on the tablename or Column reference. Also, try
Debug.Assert(ds.Tables.Count > 0) and see if the assertion works. Looks
like something wasn't instantiated.

Edb..post the whole snippet if this doesn't work, but if you are sure this
is the line throwing the exception...the datatable and/or column reference
is the most likely culprit.

HTH,

Bill
 
Back
Top