Click here to Skip to main content
15,883,809 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionObject reference not set to an instance of an object. Pin
Darwin Ahmed21-Jul-19 12:06
Darwin Ahmed21-Jul-19 12:06 
AnswerRe: Object reference not set to an instance of an object. Pin
phil.o21-Jul-19 19:50
professionalphil.o21-Jul-19 19:50 
AnswerRe: Object reference not set to an instance of an object. Pin
ZurdoDev24-Jul-19 9:10
professionalZurdoDev24-Jul-19 9:10 
QuestionChange Value of HttpContext.Current.User Pin
MadDashCoder21-Jul-19 4:26
MadDashCoder21-Jul-19 4:26 
AnswerRe: Change Value of HttpContext.Current.User Pin
Richard MacCutchan21-Jul-19 6:42
mveRichard MacCutchan21-Jul-19 6:42 
AnswerRe: Change Value of HttpContext.Current.User Pin
Afzaal Ahmad Zeeshan21-Jul-19 6:51
professionalAfzaal Ahmad Zeeshan21-Jul-19 6:51 
AnswerRe: Change Value of HttpContext.Current.User Pin
ZurdoDev24-Jul-19 9:12
professionalZurdoDev24-Jul-19 9:12 
QuestionQuery timing out, help please!!! Pin
samflex19-Jul-19 8:38
samflex19-Jul-19 8:38 
Greetings experts,

When I run my app with the following code:

Private Sub SearchCustomers()
      Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
      Dim startDate As DateTime
      Dim EndDate As DateTime
      Using con As New SqlConnection(constr)

          Using cmd As New SqlCommand()

              Dim sql As String = "spGetLogs"
              cmd.CommandType = CommandType.StoredProcedure
              cmd.Parameters.AddWithValue("@uuid", suuid.Text)
              cmd.Parameters.AddWithValue("@callerlist", caller_list_id.Text)
              cmd.Parameters.AddWithValue("@phone", phonenumber.Text)
              If DateTime.TryParseExact(date_start.Text, "yyyy-MM-dd HH:mm:ss", Nothing, System.Globalization.DateTimeStyles.None, startDate) Then
                  cmd.Parameters.AddWithValue("@start", startDate)
              Else
                  cmd.Parameters.AddWithValue("@start", DBNull.Value)
              End If
              If DateTime.TryParseExact(date_end.Text, "yyyy-MM-dd HH:mm:ss", Nothing, System.Globalization.DateTimeStyles.None, EndDate) Then
                  cmd.Parameters.AddWithValue("@Endd", EndDate)
              Else
                  cmd.Parameters.AddWithValue("@Endd", DBNull.Value)
              End If
              cmd.Parameters.AddWithValue("@calltype", call_type.SelectedValue)
              'Response.Write(sql)
              'Response.End()
              cmd.CommandText = sql
              cmd.CommandTimeout = 600
              cmd.Connection = con
              Using sda As New SqlDataAdapter(cmd)
                  Dim dt As New DataTable()
                  sda.Fill(dt)
                  gvCustomers.DataSource = dt
                  gvCustomers.DataBind()

              End Using
          End Using
      End Using
  End Sub


It just keeps timing out.

However, if I run the query used in the spGetLogs stored procedure to get a count of records, it is only 191,000.

Is there something wrong with the code below?

I will be happy to post the query inside the spGetLogs stored procedure.

I have been thrust into a demo of this app on Monday.

In fact, we went through this with the users a couple of hours ago and now I run into this huge issue.

Any assistance is greatly appreciated.
AnswerRe: Query timing out, help please!!! Pin
ZurdoDev19-Jul-19 10:14
professionalZurdoDev19-Jul-19 10:14 
AnswerRe: Query timing out, help please!!! Pin
David Mujica22-Jul-19 7:59
David Mujica22-Jul-19 7:59 
QuestionForm Designer Pin
wrightyrx715-Jul-19 4:58
wrightyrx715-Jul-19 4:58 
AnswerRe: Form Designer Pin
Mycroft Holmes15-Jul-19 11:26
professionalMycroft Holmes15-Jul-19 11:26 
GeneralRe: Form Designer Pin
wrightyrx715-Jul-19 11:33
wrightyrx715-Jul-19 11:33 
GeneralRe: Form Designer Pin
Mycroft Holmes15-Jul-19 14:08
professionalMycroft Holmes15-Jul-19 14:08 
QuestionGetting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran11-Jul-19 9:29
Abdalla Ben Omran11-Jul-19 9:29 
AnswerRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano11-Jul-19 10:12
professionalVincent Maverick Durano11-Jul-19 10:12 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran12-Jul-19 5:12
Abdalla Ben Omran12-Jul-19 5:12 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano12-Jul-19 12:01
professionalVincent Maverick Durano12-Jul-19 12:01 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran13-Jul-19 0:31
Abdalla Ben Omran13-Jul-19 0:31 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano16-Jul-19 9:01
professionalVincent Maverick Durano16-Jul-19 9:01 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran17-Jul-19 3:26
Abdalla Ben Omran17-Jul-19 3:26 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano18-Jul-19 8:00
professionalVincent Maverick Durano18-Jul-19 8:00 
QuestionA Potentially Dangerous Request.form Value Was Detected From The Client Pin
Member 1451693730-Jun-19 19:32
Member 1451693730-Jun-19 19:32 
AnswerRe: A Potentially Dangerous Request.form Value Was Detected From The Client Pin
F-ES Sitecore30-Jun-19 22:01
professionalF-ES Sitecore30-Jun-19 22:01 
GeneralRe: A Potentially Dangerous Request.form Value Was Detected From The Client Pin
Member 1451693730-Jun-19 22:50
Member 1451693730-Jun-19 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.