Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Gridview not showing first set of data from my query

Gridview not showing first set of data from my query

Scheduled Pinned Locked Moved ASP.NET
databasehelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    aransiola
    wrote on last edited by
    #1

    Gridview not showing first set of data from my query. e.g if my date range is 01/09/2007 to 30/09/2007, the gridview will display data from 02/09/2007 to 30/09/2007 if the range selected is 02/09/2007 to 30/09/2007 it displays data from 03/09/2007 to 30/09/2007 see my query expression ------------------------ Dim strCmd As String = "Select * From vwPOVendor " strCmd += " Where PODate Between '" & Format(Date1, "yyyy-MM-dd hh:mm:ss") & "' AND '" & Format(Date2, "yyyy-MM-dd hh:mm:ss") & "'" Dim strConn As String = ConfigurationManager.ConnectionStrings("PODataConnectionString1").ConnectionString Dim sqlConn As SqlConnection = New SqlConnection(strConn) If sqlConn.State = ConnectionState.Closed Then sqlConn.Open() End If Dim ds As DataSet = New DataSet() Dim da As SqlDataAdapter = New SqlDataAdapter(strCmd, sqlConn) da.Fill(ds, "vendors") 'Closing Sql Connection sqlConn.Close() Label1.Text = ds.Tables("vendors").Rows.Count grdPOrders.DataSource = ds.Tables("vendors") grdPOrders.DataBind() ive also tried -------------- strCmd += " Where PODate >= '" & Format(Date1, "yyyy-MM-dd hh:mm:ss") & "' AND PODate <= '" & Format(Date2, "yyyy-MM-dd hh:mm:ss") & "'" please help t.aransiola

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups