Showing posts with label object. Show all posts
Showing posts with label object. Show all posts

Wednesday, March 21, 2012

Help On Buffer latch timeout

Time out occurred while waiting for buffer latch type 2,bp 0x18b7d40, page 1:11558916), stat 0xb, object ID 9:1842105603:2, EC 0x5862D9C8 : 0, waittime 300. Not continuing to wait.
What does this mean any reason and fix for it..?
ThanksI don't see a reference to the database ID. Usually page reference can be seen in the form 2:1:12312, where 2 is the database id (tempdb in this case), 1 is the file number (1st data file), and the object id (ALL THIS IS RIGHT IF I RECALL CORRECTLY!)

Also, check Buffer Latch Timeouts or Server Sluggishness Occurs When You Remove Procedures From Cache (http://support.microsoft.com/default.aspx?scid=kb;EN-US;309093) for references.

help -Object reference not set to an instance of an object.

i m new for asp.net

when i run app. i got this error,

-----
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 49:
Line 50: adpt.Fill(ds, "SMS_student_class_master")
Line 51: txt.Text = ds.Tables.Item("roll_no").ToString
Line 52: con.Close()
Line 53: End Sub

Source File: c:\inetpub\wwwroot\aspnet\sms\assignment_d.aspx.vb Line: 51
------

my source code given below,

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsNothing(Request.QueryString("id")) Then
sid = Request.QueryString("id")
End If
Dim con As New SqlConnection
Dim constr As String
Dim cmd As New SqlCommand
Dim ds As New DataSet
Dim adpt As New SqlDataAdapter

constr = "data source=Baroda;user id=sa;password=;" & _
"initial catalog=SMS;persist security info=False;workstation id=Baroda;Packet size=4096"
con.ConnectionString = constr
con.Open()

cmd.CommandText = "SELECT * FROM SMS_student_class_master WHERE " & _
"stud_id='" + sid + "'"
cmd.Connection = con
adpt.SelectCommand = cmd

adpt.Fill(ds, "SMS_student_class_master")
txt.Text = ds.Tables.Item("roll_no").ToString
con.Close()
End Sub
---

what should i do?
anyone have any idea?
plz give solution.
its urgent.

thanks in advance.cmd.Connection = con
adpt = new SqlDataAdapter(cmd)
adpt.Fill(...)