Click here to Skip to main content
14,300,422 members
   

ASP.NET

 
QuestionObject reference not set to an instance of an object. Pin
Darwin Ahmed21-Jul-19 12:06
memberDarwin Ahmed21-Jul-19 12:06 
AnswerRe: Object reference not set to an instance of an object. Pin
phil.o21-Jul-19 19:50
mvephil.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
memberMadDashCoder21-Jul-19 4:26 
AnswerRe: Change Value of HttpContext.Current.User Pin
Richard MacCutchan21-Jul-19 6:42
protectorRichard MacCutchan21-Jul-19 6:42 
AnswerRe: Change Value of HttpContext.Current.User Pin
Afzaal Ahmad Zeeshan21-Jul-19 6:51
mveAfzaal 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
membersamflex19-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
memberDavid Mujica22-Jul-19 7:59 
QuestionForm Designer Pin
wrightyrx715-Jul-19 4:58
memberwrightyrx715-Jul-19 4:58 
AnswerRe: Form Designer Pin
Mycroft Holmes15-Jul-19 11:26
memberMycroft Holmes15-Jul-19 11:26 
GeneralRe: Form Designer Pin
wrightyrx715-Jul-19 11:33
memberwrightyrx715-Jul-19 11:33 
GeneralRe: Form Designer Pin
Mycroft Holmes15-Jul-19 14:08
memberMycroft Holmes15-Jul-19 14:08 
QuestionGetting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran11-Jul-19 9:29
memberAbdalla Ben Omran11-Jul-19 9:29 
AnswerRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano11-Jul-19 10:12
mveVincent Maverick Durano11-Jul-19 10:12 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran12-Jul-19 5:12
memberAbdalla Ben Omran12-Jul-19 5:12 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano12-Jul-19 12:01
mveVincent Maverick Durano12-Jul-19 12:01 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran13-Jul-19 0:31
memberAbdalla Ben Omran13-Jul-19 0:31 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano16-Jul-19 9:01
mveVincent Maverick Durano16-Jul-19 9:01 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Abdalla Ben Omran17-Jul-19 3:26
memberAbdalla Ben Omran17-Jul-19 3:26 
GeneralRe: Getting undefined in Cascading DropDownList In ASP.Core MVC ? Pin
Vincent Maverick Durano18-Jul-19 8:00
mveVincent Maverick Durano18-Jul-19 8:00 
QuestionA Potentially Dangerous Request.form Value Was Detected From The Client Pin
Member 1451693730-Jun-19 19:32
memberMember 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
mveF-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
memberMember 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.