הודעת שגיאה... :/

ilanababa

New member
הודעת שגיאה... :/

אולי מישהו יודע מה אפשר לעשות במצב שמקבלים את ההודעת שגיאה הבאה: Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Source Error: Line 385: SqlConnection con13; Line 386: con13= new SqlConnection("data source=(local); integrated security=true; initial catalog=project1"); Line 387: SqlCommand com13 = new SqlCommand("USE " + s1 + " DROP TABLE " + lst_tbl.SelectedItem.ToString(), con13); Line 388: con13.Open(); Line 389: com13.ExecuteNonQuery(); Source File: c:\inetpub\wwwroot\project3\tables.aspx.cs Line: 387 תודה למי שיכול לעזור=]
 

ilanababa

New member
עזרה דחופה !!

נתקעתי עם ההודעה הזאת ואין לי מושג מה לעשות!! ניסיתי הכל !!! בבקשה תעזרו....
 

ציפי81

New member
-->

1. בבקשה תיישרי להבא לשמאל כך יותר קל לקרוא. 2. אנא הציגי את הקוד.
 
רמזים

עלייך לבחון באמצעות debug את האבייקטים שבהם את משתמשת בשורה 387 ואלו הם: s1 lst_tbl.SelectedItem con13 כנראה שאחד מהם null
 
למעלה