error: Object reference not set to an instance of an object

error: Object reference not set to an instance of an object

Post by Mary Dibli » Sun, 02 Jun 2002 23:03:35



error: Object reference not set to an instance of an object

I get this error when I try to add any control to the
form.

I tried to create another form in the same project and get
the same thing. I have to create a whole new project/

Anyone know how to fix this ? Otherwise I have to start
all over :(

Thanks.

 
 
 

error: Object reference not set to an instance of an object

Post by Shawn Burke [MSFT » Mon, 03 Jun 2002 03:53:31


Can you attach a callstack?

Start another instance of VS, choose debug >> Processes... >> Devenv.exe >>
Attach, then Debug >> Exceptions >> Common Language Runtime Exceptions, and
choose "Break" under "When an Exception is thrown".  Then cause the error in
the original instance of VS, and the second one will break. Paste in the
callstack and maybe I can see what's going wrong.

--

--

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. ? 2002 Microsoft Corporation. All rights
reserved.

Quote:> error: Object reference not set to an instance of an object

> I get this error when I try to add any control to the
> form.

> I tried to create another form in the same project and get
> the same thing. I have to create a whole new project/

> Anyone know how to fix this ? Otherwise I have to start
> all over :(

> Thanks.


 
 
 

error: Object reference not set to an instance of an object

Post by Mary Clark-Dibli » Mon, 03 Jun 2002 04:55:42


Shawn,

I had already removed the project from the solution and started over. I
went and added it back in and the problem disappeared ???

I had previously tried closing the solution and reopening it, so
removing it and adding it fixed the problem.

Next time I'll know how to send a callstack.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

 
 
 

1. error: object reference not set to an instance of an object

Hi,

This is my code but i am getting an error:

object reference not set to an instance of an object

  Dim mySelectText As String = "SELECT * FROM equ_ren"
            Dim mySelectConn As String = "Integrated
Security=SSPI; Persist Security Info=False;Initial
Catalog=equipment_rental;Data Source=GMSSGCESD001"
            Dim myDataAdapter As New SqlDataAdapter
(mySelectText, mySelectConn)
            Dim InsertCmd As String = "Update equ_ren set
type = '" & type.text & "', brand = '" & brand.text & "',
model = '" & model.text & "',"
                InsertCmd = InsertCmd & " serial_no = '"
& sn_no.text & "', status = '" & status.text & "',
renting_company = '" & renting_company.text & "',"
                InsertCmd = InsertCmd & " end_user = '" &
end_user.text & "', inst_loc = '" & inst_loc.text & "',
inst_date =  " & inst_dt.text & ","
                InsertCmd = InsertCmd & " rent_bill_date
= " & rent_bill_dt.text & " ,bill_period = '" &
bill_period.text & "',"
                InsertCmd = InsertCmd & " inst_billed
= '" & inst_billed.SelectedItem.Value & "', lan_IP= '" &
lan_IP.text & "' where serial_no = '" & sn_no.text & "';"

            myDataAdapter.UpdateCommand.CommandText =
InsertCmd
            myDataAdapter.UpdateCommand.Connection = CType
(myDataAdapter.SelectCommand.Connection, SqlConnection)

thanks for sparing ur valuable time.

cheers

prasanna

2. Fast File Transfer for Macintosh

3. SQL Errors: Object reference not set to an instance of an object.

4. HP Deskjet 310

5. Crystal Reports-Error: Object reference not set to an instance of an object.

6. Multiple ISP's on Server

7. Object Reference Not Set to an Instance of an Object error when calling unmanaged DLL function

8. Cannot access XML data island in Win2K

9. Object reference not set to an instance of an object error

10. error: "Object reference not set to an instance of an object"

11. Error Creating Control (Object reference not set to an instance of an object.)

12. Custom class error: "Object reference not set to an instance of an object."

13. System.Exception: Mid-Object reference not set to an instance of an object.