Index was out of range ERROR <NEWBIE ERROR>

Discussion in 'ASP .Net' started by =?Utf-8?B?UnVkeQ==?=, Jul 6, 2005.

  1. Hello all!
    I'm just trying to delete a row from in a datagrid. Getting the following
    error.
    "System.ArgumentOutOfRangeException: Index was out of range. Must be
    non-negative and less than the size of the collection. Parameter name: index"

    Here is my code,

    Public Class frmNotesGrd
    Inherits System.Web.UI.Page
    Protected ConnString As String =
    ConfigurationSettings.AppSettings("ConnString")

    #Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub
    InitializeComponent()
    Me.daNoteGrd = New System.Data.SqlClient.SqlDataAdapter
    Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
    Me.ConnNoteGrd = New System.Data.SqlClient.SqlConnection
    Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
    Me.DsNoteGrd1 = New NConline.dsNoteGrd
    CType(Me.DsNoteGrd1,
    System.ComponentModel.ISupportInitialize).BeginInit()
    '
    'daNoteGrd
    '
    Me.daNoteGrd.InsertCommand = Me.SqlInsertCommand1
    Me.daNoteGrd.SelectCommand = Me.SqlSelectCommand1
    Me.daNoteGrd.TableMappings.AddRange(New
    System.Data.Common.DataTableMapping() {New
    System.Data.Common.DataTableMapping("Table", "Notes", New
    System.Data.Common.DataColumnMapping() {New
    System.Data.Common.DataColumnMapping("NoteID", "NoteID"), New
    System.Data.Common.DataColumnMapping("ToUser", "ToUser"), New
    System.Data.Common.DataColumnMapping("Body", "Body"), New
    System.Data.Common.DataColumnMapping("Frm", "Frm"), New
    System.Data.Common.DataColumnMapping("Date", "Date")})})
    '
    'SqlInsertCommand1
    '
    Me.SqlInsertCommand1.CommandText = "INSERT INTO Notes(ToUser, Body,
    Frm, Date) VALUES (@ToUser, @Body, @Frm, @Date); " & _
    "SELECT NoteID, ToUser, Body, Frm, Date FROM Notes"
    Me.SqlInsertCommand1.Connection = Me.ConnNoteGrd
    Me.SqlInsertCommand1.Parameters.Add(New
    System.Data.SqlClient.SqlParameter("@ToUser", System.Data.SqlDbType.NVarChar,
    100, "ToUser"))
    Me.SqlInsertCommand1.Parameters.Add(New
    System.Data.SqlClient.SqlParameter("@Body", System.Data.SqlDbType.NVarChar,
    200, "Body"))
    Me.SqlInsertCommand1.Parameters.Add(New
    System.Data.SqlClient.SqlParameter("@Frm", System.Data.SqlDbType.NVarChar,
    100, "Frm"))
    Me.SqlInsertCommand1.Parameters.Add(New
    System.Data.SqlClient.SqlParameter("@Date", System.Data.SqlDbType.DateTime,
    8, "Date"))
    '
    'ConnNoteGrd
    '
    Me.ConnNoteGrd.ConnectionString = "workstation id=LOCALHOST;packet
    size=4096;user id=Tesla;data source=NCONLINE;pers" & _
    "ist security info=False;initial catalog=Forums"
    '
    'SqlSelectCommand1
    '
    Me.SqlSelectCommand1.CommandText = "SELECT NoteID, ToUser, Body,
    Frm, Date FROM Notes"
    Me.SqlSelectCommand1.Connection = Me.ConnNoteGrd
    '
    'DsNoteGrd1
    '
    Me.DsNoteGrd1.DataSetName = "dsNoteGrd"
    Me.DsNoteGrd1.Locale = New System.Globalization.CultureInfo("en-US")
    CType(Me.DsNoteGrd1,
    System.ComponentModel.ISupportInitialize).EndInit()

    End Sub
    Protected WithEvents daNoteGrd As System.Data.SqlClient.SqlDataAdapter
    Protected WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
    Protected WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
    Protected WithEvents ConnNoteGrd As System.Data.SqlClient.SqlConnection
    Protected WithEvents DsNoteGrd1 As NConline.dsNoteGrd
    Protected WithEvents dgNotes As System.Web.UI.WebControls.DataGrid
    Protected WithEvents lblUser As System.Web.UI.WebControls.Label
    Protected WithEvents lblPagingInfo As System.Web.UI.WebControls.Label

    'NOTE: The following placeholder declaration is required by the Web Form
    Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Init
    'CODEGEN: This method call is required by the Web Form Designer
    'Do not modify it using the code editor.
    InitializeComponent()
    End Sub

    #End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    lblUser.Text = Session("UserNm")
    If Not Page.IsPostBack Then
    BindData()
    End If






    End Sub

    Sub BindData()
    ConnNoteGrd = New SqlConnection(ConnString)
    Dim strQse As String
    strQse = "SELECT * FROM Notes Where ToUser ='" + lblUser.Text + "'
    ORDER by Date"
    Dim cmdNoteGrd As New SqlCommand(strQse, ConnNoteGrd)

    Dim daNotegrd As New SqlDataAdapter
    daNotegrd.SelectCommand = cmdNoteGrd
    ConnNoteGrd.Open()

    Dim dsNoteGrd As DataSet = New DataSet
    daNotegrd.Fill(dsNoteGrd, "Notes")

    ConnNoteGrd.Close()

    dgNotes.DataSource = dsNoteGrd
    dgNotes.DataBind()

    ConnNoteGrd.Close()

    End Sub
    Sub ShowPageInfo()
    'This sub didsplays pageing info in apropiate label
    lblPagingInfo.Text = "DispalyingPage " & (dgNotes.CurrentPageIndex +
    1).ToString() & " of " & dgNotes.PageCount
    End Sub


    Private Sub dgNotes_DeleteCommand(ByVal source As Object, ByVal e As
    System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    dgNotes.DeleteCommand

    dgNotes.EditItemIndex = -1

    Dim NoteID As Integer
    NoteID = dgNotes.DataKeys(e.Item.ItemIndex)

    Dim strDelete As String
    strDelete = "DELETE FROM Notes WHERE NoteID = @noteIDParam"

    Dim cmdDel As New SqlCommand(strDelete, ConnNoteGrd)

    Dim NoteIDParam As New SqlParameter("@noteIDParam", SqlDbType.Int, 4)
    NoteIDParam.Value = NoteID
    cmdDel.Parameters.Add(NoteIDParam)

    ConnNoteGrd.Open()
    cmdDel.ExecuteNonQuery()
    dgNotes.DataBind()
    ConnNoteGrd.Close()

    End Sub

    Private Sub dgNotes_PageIndexChanged(ByVal source As Object, ByVal e As
    System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    dgNotes.PageIndexChanged
    dgNotes.EditItemIndex = -1

    dgNotes.CurrentPageIndex = e.NewPageIndex
    BindData
    End Sub

    If somebody could take a look, and point me in the right direction, that
    would be great.
    My table name in SQL is called NOTES, witht he following
    noteID int 4
    ToUser nvarchar 100
    Body nvarchar 200
    Frm nvarchar 100
    Date datetime 8

    TIA!!!

    Rudy
    =?Utf-8?B?UnVkeQ==?=, Jul 6, 2005
    #1
    1. Advertising

  2. Hi!

    I'm not entirely sure, (since you didn't provide the line number ;) ), but
    it looks like the exception is thrown when you try to rebind the table after
    deleting the row. (Might be a dropdownlist in your grid?)

    When you call dgNotes.DataBind in the DeleteCommand handler, your data
    source is gone. (You're only filling it if the page isn't in a postback
    state)

    Try calling BindData() instad of dgNotes.DataBind() at the end of the
    DeleteCommand handler.

    HTH,
    Lars-Erik

    "Rudy" <> wrote in message
    news:...
    > Hello all!
    > I'm just trying to delete a row from in a datagrid. Getting the following
    > error.
    > "System.ArgumentOutOfRangeException: Index was out of range. Must be
    > non-negative and less than the size of the collection. Parameter name:
    > index"
    >
    > Here is my code,
    >
    > Public Class frmNotesGrd
    > Inherits System.Web.UI.Page
    > Protected ConnString As String =
    > ConfigurationSettings.AppSettings("ConnString")
    >
    > #Region " Web Form Designer Generated Code "
    >
    > 'This call is required by the Web Form Designer.
    > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    > InitializeComponent()
    > Me.daNoteGrd = New System.Data.SqlClient.SqlDataAdapter
    > Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
    > Me.ConnNoteGrd = New System.Data.SqlClient.SqlConnection
    > Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
    > Me.DsNoteGrd1 = New NConline.dsNoteGrd
    > CType(Me.DsNoteGrd1,
    > System.ComponentModel.ISupportInitialize).BeginInit()
    > '
    > 'daNoteGrd
    > '
    > Me.daNoteGrd.InsertCommand = Me.SqlInsertCommand1
    > Me.daNoteGrd.SelectCommand = Me.SqlSelectCommand1
    > Me.daNoteGrd.TableMappings.AddRange(New
    > System.Data.Common.DataTableMapping() {New
    > System.Data.Common.DataTableMapping("Table", "Notes", New
    > System.Data.Common.DataColumnMapping() {New
    > System.Data.Common.DataColumnMapping("NoteID", "NoteID"), New
    > System.Data.Common.DataColumnMapping("ToUser", "ToUser"), New
    > System.Data.Common.DataColumnMapping("Body", "Body"), New
    > System.Data.Common.DataColumnMapping("Frm", "Frm"), New
    > System.Data.Common.DataColumnMapping("Date", "Date")})})
    > '
    > 'SqlInsertCommand1
    > '
    > Me.SqlInsertCommand1.CommandText = "INSERT INTO Notes(ToUser, Body,
    > Frm, Date) VALUES (@ToUser, @Body, @Frm, @Date); " & _
    > "SELECT NoteID, ToUser, Body, Frm, Date FROM Notes"
    > Me.SqlInsertCommand1.Connection = Me.ConnNoteGrd
    > Me.SqlInsertCommand1.Parameters.Add(New
    > System.Data.SqlClient.SqlParameter("@ToUser",
    > System.Data.SqlDbType.NVarChar,
    > 100, "ToUser"))
    > Me.SqlInsertCommand1.Parameters.Add(New
    > System.Data.SqlClient.SqlParameter("@Body",
    > System.Data.SqlDbType.NVarChar,
    > 200, "Body"))
    > Me.SqlInsertCommand1.Parameters.Add(New
    > System.Data.SqlClient.SqlParameter("@Frm", System.Data.SqlDbType.NVarChar,
    > 100, "Frm"))
    > Me.SqlInsertCommand1.Parameters.Add(New
    > System.Data.SqlClient.SqlParameter("@Date",
    > System.Data.SqlDbType.DateTime,
    > 8, "Date"))
    > '
    > 'ConnNoteGrd
    > '
    > Me.ConnNoteGrd.ConnectionString = "workstation id=LOCALHOST;packet
    > size=4096;user id=Tesla;data source=NCONLINE;pers" & _
    > "ist security info=False;initial catalog=Forums"
    > '
    > 'SqlSelectCommand1
    > '
    > Me.SqlSelectCommand1.CommandText = "SELECT NoteID, ToUser, Body,
    > Frm, Date FROM Notes"
    > Me.SqlSelectCommand1.Connection = Me.ConnNoteGrd
    > '
    > 'DsNoteGrd1
    > '
    > Me.DsNoteGrd1.DataSetName = "dsNoteGrd"
    > Me.DsNoteGrd1.Locale = New
    > System.Globalization.CultureInfo("en-US")
    > CType(Me.DsNoteGrd1,
    > System.ComponentModel.ISupportInitialize).EndInit()
    >
    > End Sub
    > Protected WithEvents daNoteGrd As System.Data.SqlClient.SqlDataAdapter
    > Protected WithEvents SqlSelectCommand1 As
    > System.Data.SqlClient.SqlCommand
    > Protected WithEvents SqlInsertCommand1 As
    > System.Data.SqlClient.SqlCommand
    > Protected WithEvents ConnNoteGrd As System.Data.SqlClient.SqlConnection
    > Protected WithEvents DsNoteGrd1 As NConline.dsNoteGrd
    > Protected WithEvents dgNotes As System.Web.UI.WebControls.DataGrid
    > Protected WithEvents lblUser As System.Web.UI.WebControls.Label
    > Protected WithEvents lblPagingInfo As System.Web.UI.WebControls.Label
    >
    > 'NOTE: The following placeholder declaration is required by the Web
    > Form
    > Designer.
    > 'Do not delete or move it.
    > Private designerPlaceholderDeclaration As System.Object
    >
    > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Init
    > 'CODEGEN: This method call is required by the Web Form Designer
    > 'Do not modify it using the code editor.
    > InitializeComponent()
    > End Sub
    >
    > #End Region
    >
    > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > System.EventArgs) Handles MyBase.Load
    > lblUser.Text = Session("UserNm")
    > If Not Page.IsPostBack Then
    > BindData()
    > End If
    >
    >
    >
    >
    >
    >
    > End Sub
    >
    > Sub BindData()
    > ConnNoteGrd = New SqlConnection(ConnString)
    > Dim strQse As String
    > strQse = "SELECT * FROM Notes Where ToUser ='" + lblUser.Text + "'
    > ORDER by Date"
    > Dim cmdNoteGrd As New SqlCommand(strQse, ConnNoteGrd)
    >
    > Dim daNotegrd As New SqlDataAdapter
    > daNotegrd.SelectCommand = cmdNoteGrd
    > ConnNoteGrd.Open()
    >
    > Dim dsNoteGrd As DataSet = New DataSet
    > daNotegrd.Fill(dsNoteGrd, "Notes")
    >
    > ConnNoteGrd.Close()
    >
    > dgNotes.DataSource = dsNoteGrd
    > dgNotes.DataBind()
    >
    > ConnNoteGrd.Close()
    >
    > End Sub
    > Sub ShowPageInfo()
    > 'This sub didsplays pageing info in apropiate label
    > lblPagingInfo.Text = "DispalyingPage " & (dgNotes.CurrentPageIndex
    > +
    > 1).ToString() & " of " & dgNotes.PageCount
    > End Sub
    >
    >
    > Private Sub dgNotes_DeleteCommand(ByVal source As Object, ByVal e As
    > System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    > dgNotes.DeleteCommand
    >
    > dgNotes.EditItemIndex = -1
    >
    > Dim NoteID As Integer
    > NoteID = dgNotes.DataKeys(e.Item.ItemIndex)
    >
    > Dim strDelete As String
    > strDelete = "DELETE FROM Notes WHERE NoteID = @noteIDParam"
    >
    > Dim cmdDel As New SqlCommand(strDelete, ConnNoteGrd)
    >
    > Dim NoteIDParam As New SqlParameter("@noteIDParam", SqlDbType.Int,
    > 4)
    > NoteIDParam.Value = NoteID
    > cmdDel.Parameters.Add(NoteIDParam)
    >
    > ConnNoteGrd.Open()
    > cmdDel.ExecuteNonQuery()
    > dgNotes.DataBind()
    > ConnNoteGrd.Close()
    >
    > End Sub
    >
    > Private Sub dgNotes_PageIndexChanged(ByVal source As Object, ByVal e As
    > System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    > dgNotes.PageIndexChanged
    > dgNotes.EditItemIndex = -1
    >
    > dgNotes.CurrentPageIndex = e.NewPageIndex
    > BindData
    > End Sub
    >
    > If somebody could take a look, and point me in the right direction, that
    > would be great.
    > My table name in SQL is called NOTES, witht he following
    > noteID int 4
    > ToUser nvarchar 100
    > Body nvarchar 200
    > Frm nvarchar 100
    > Date datetime 8
    >
    > TIA!!!
    >
    > Rudy
    Lars-Erik Aabech, Jul 6, 2005
    #2
    1. Advertising

  3. Hi Lars!

    This is the line I get therror
    Line 119: NoteID = dgNotes.DataKeys(e.Item.ItemIndex)
    I'll try what you suggested and let you know.
    Thanks!

    "Lars-Erik Aabech" wrote:

    > Hi!
    >
    > I'm not entirely sure, (since you didn't provide the line number ;) ), but
    > it looks like the exception is thrown when you try to rebind the table after
    > deleting the row. (Might be a dropdownlist in your grid?)
    >
    > When you call dgNotes.DataBind in the DeleteCommand handler, your data
    > source is gone. (You're only filling it if the page isn't in a postback
    > state)
    >
    > Try calling BindData() instad of dgNotes.DataBind() at the end of the
    > DeleteCommand handler.
    >
    > HTH,
    > Lars-Erik
    >
    > "Rudy" <> wrote in message
    > news:...
    > > Hello all!
    > > I'm just trying to delete a row from in a datagrid. Getting the following
    > > error.
    > > "System.ArgumentOutOfRangeException: Index was out of range. Must be
    > > non-negative and less than the size of the collection. Parameter name:
    > > index"
    > >
    > > Here is my code,
    > >
    > > Public Class frmNotesGrd
    > > Inherits System.Web.UI.Page
    > > Protected ConnString As String =
    > > ConfigurationSettings.AppSettings("ConnString")
    > >
    > > #Region " Web Form Designer Generated Code "
    > >
    > > 'This call is required by the Web Form Designer.
    > > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    > > InitializeComponent()
    > > Me.daNoteGrd = New System.Data.SqlClient.SqlDataAdapter
    > > Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
    > > Me.ConnNoteGrd = New System.Data.SqlClient.SqlConnection
    > > Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
    > > Me.DsNoteGrd1 = New NConline.dsNoteGrd
    > > CType(Me.DsNoteGrd1,
    > > System.ComponentModel.ISupportInitialize).BeginInit()
    > > '
    > > 'daNoteGrd
    > > '
    > > Me.daNoteGrd.InsertCommand = Me.SqlInsertCommand1
    > > Me.daNoteGrd.SelectCommand = Me.SqlSelectCommand1
    > > Me.daNoteGrd.TableMappings.AddRange(New
    > > System.Data.Common.DataTableMapping() {New
    > > System.Data.Common.DataTableMapping("Table", "Notes", New
    > > System.Data.Common.DataColumnMapping() {New
    > > System.Data.Common.DataColumnMapping("NoteID", "NoteID"), New
    > > System.Data.Common.DataColumnMapping("ToUser", "ToUser"), New
    > > System.Data.Common.DataColumnMapping("Body", "Body"), New
    > > System.Data.Common.DataColumnMapping("Frm", "Frm"), New
    > > System.Data.Common.DataColumnMapping("Date", "Date")})})
    > > '
    > > 'SqlInsertCommand1
    > > '
    > > Me.SqlInsertCommand1.CommandText = "INSERT INTO Notes(ToUser, Body,
    > > Frm, Date) VALUES (@ToUser, @Body, @Frm, @Date); " & _
    > > "SELECT NoteID, ToUser, Body, Frm, Date FROM Notes"
    > > Me.SqlInsertCommand1.Connection = Me.ConnNoteGrd
    > > Me.SqlInsertCommand1.Parameters.Add(New
    > > System.Data.SqlClient.SqlParameter("@ToUser",
    > > System.Data.SqlDbType.NVarChar,
    > > 100, "ToUser"))
    > > Me.SqlInsertCommand1.Parameters.Add(New
    > > System.Data.SqlClient.SqlParameter("@Body",
    > > System.Data.SqlDbType.NVarChar,
    > > 200, "Body"))
    > > Me.SqlInsertCommand1.Parameters.Add(New
    > > System.Data.SqlClient.SqlParameter("@Frm", System.Data.SqlDbType.NVarChar,
    > > 100, "Frm"))
    > > Me.SqlInsertCommand1.Parameters.Add(New
    > > System.Data.SqlClient.SqlParameter("@Date",
    > > System.Data.SqlDbType.DateTime,
    > > 8, "Date"))
    > > '
    > > 'ConnNoteGrd
    > > '
    > > Me.ConnNoteGrd.ConnectionString = "workstation id=LOCALHOST;packet
    > > size=4096;user id=Tesla;data source=NCONLINE;pers" & _
    > > "ist security info=False;initial catalog=Forums"
    > > '
    > > 'SqlSelectCommand1
    > > '
    > > Me.SqlSelectCommand1.CommandText = "SELECT NoteID, ToUser, Body,
    > > Frm, Date FROM Notes"
    > > Me.SqlSelectCommand1.Connection = Me.ConnNoteGrd
    > > '
    > > 'DsNoteGrd1
    > > '
    > > Me.DsNoteGrd1.DataSetName = "dsNoteGrd"
    > > Me.DsNoteGrd1.Locale = New
    > > System.Globalization.CultureInfo("en-US")
    > > CType(Me.DsNoteGrd1,
    > > System.ComponentModel.ISupportInitialize).EndInit()
    > >
    > > End Sub
    > > Protected WithEvents daNoteGrd As System.Data.SqlClient.SqlDataAdapter
    > > Protected WithEvents SqlSelectCommand1 As
    > > System.Data.SqlClient.SqlCommand
    > > Protected WithEvents SqlInsertCommand1 As
    > > System.Data.SqlClient.SqlCommand
    > > Protected WithEvents ConnNoteGrd As System.Data.SqlClient.SqlConnection
    > > Protected WithEvents DsNoteGrd1 As NConline.dsNoteGrd
    > > Protected WithEvents dgNotes As System.Web.UI.WebControls.DataGrid
    > > Protected WithEvents lblUser As System.Web.UI.WebControls.Label
    > > Protected WithEvents lblPagingInfo As System.Web.UI.WebControls.Label
    > >
    > > 'NOTE: The following placeholder declaration is required by the Web
    > > Form
    > > Designer.
    > > 'Do not delete or move it.
    > > Private designerPlaceholderDeclaration As System.Object
    > >
    > > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles MyBase.Init
    > > 'CODEGEN: This method call is required by the Web Form Designer
    > > 'Do not modify it using the code editor.
    > > InitializeComponent()
    > > End Sub
    > >
    > > #End Region
    > >
    > > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > > System.EventArgs) Handles MyBase.Load
    > > lblUser.Text = Session("UserNm")
    > > If Not Page.IsPostBack Then
    > > BindData()
    > > End If
    > >
    > >
    > >
    > >
    > >
    > >
    > > End Sub
    > >
    > > Sub BindData()
    > > ConnNoteGrd = New SqlConnection(ConnString)
    > > Dim strQse As String
    > > strQse = "SELECT * FROM Notes Where ToUser ='" + lblUser.Text + "'
    > > ORDER by Date"
    > > Dim cmdNoteGrd As New SqlCommand(strQse, ConnNoteGrd)
    > >
    > > Dim daNotegrd As New SqlDataAdapter
    > > daNotegrd.SelectCommand = cmdNoteGrd
    > > ConnNoteGrd.Open()
    > >
    > > Dim dsNoteGrd As DataSet = New DataSet
    > > daNotegrd.Fill(dsNoteGrd, "Notes")
    > >
    > > ConnNoteGrd.Close()
    > >
    > > dgNotes.DataSource = dsNoteGrd
    > > dgNotes.DataBind()
    > >
    > > ConnNoteGrd.Close()
    > >
    > > End Sub
    > > Sub ShowPageInfo()
    > > 'This sub didsplays pageing info in apropiate label
    > > lblPagingInfo.Text = "DispalyingPage " & (dgNotes.CurrentPageIndex
    > > +
    > > 1).ToString() & " of " & dgNotes.PageCount
    > > End Sub
    > >
    > >
    > > Private Sub dgNotes_DeleteCommand(ByVal source As Object, ByVal e As
    > > System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    > > dgNotes.DeleteCommand
    > >
    > > dgNotes.EditItemIndex = -1
    > >
    > > Dim NoteID As Integer
    > > NoteID = dgNotes.DataKeys(e.Item.ItemIndex)
    > >
    > > Dim strDelete As String
    > > strDelete = "DELETE FROM Notes WHERE NoteID = @noteIDParam"
    > >
    > > Dim cmdDel As New SqlCommand(strDelete, ConnNoteGrd)
    > >
    > > Dim NoteIDParam As New SqlParameter("@noteIDParam", SqlDbType.Int,
    > > 4)
    > > NoteIDParam.Value = NoteID
    > > cmdDel.Parameters.Add(NoteIDParam)
    > >
    > > ConnNoteGrd.Open()
    > > cmdDel.ExecuteNonQuery()
    > > dgNotes.DataBind()
    > > ConnNoteGrd.Close()
    > >
    > > End Sub
    > >
    > > Private Sub dgNotes_PageIndexChanged(ByVal source As Object, ByVal e As
    > > System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    > > dgNotes.PageIndexChanged
    > > dgNotes.EditItemIndex = -1
    > >
    > > dgNotes.CurrentPageIndex = e.NewPageIndex
    > > BindData
    > > End Sub
    > >
    > > If somebody could take a look, and point me in the right direction, that
    > > would be great.
    > > My table name in SQL is called NOTES, witht he following
    > > noteID int 4
    > > ToUser nvarchar 100
    > > Body nvarchar 200
    > > Frm nvarchar 100
    > > Date datetime 8
    > >
    > > TIA!!!
    > >
    > > Rudy

    >
    >
    >
    =?Utf-8?B?UnVkeQ==?=, Jul 6, 2005
    #3
  4. Hi again!

    Then my answer was incorrect. :)
    Have you set the DataKeyField attribute of the datagrid?

    Like this:
    <asp:DataGrid id="dgNotes" runat="Server" DataKeyField="noteID"
    ....>...</datagrid>

    Lars-Erik


    "Rudy" <> wrote in message
    news:...
    > Hi Lars!
    >
    > This is the line I get therror
    > Line 119: NoteID = dgNotes.DataKeys(e.Item.ItemIndex)
    > I'll try what you suggested and let you know.
    > Thanks!
    >
    > "Lars-Erik Aabech" wrote:
    >
    >> Hi!
    >>
    >> I'm not entirely sure, (since you didn't provide the line number ;) ),
    >> but
    >> it looks like the exception is thrown when you try to rebind the table
    >> after
    >> deleting the row. (Might be a dropdownlist in your grid?)
    >>
    >> When you call dgNotes.DataBind in the DeleteCommand handler, your data
    >> source is gone. (You're only filling it if the page isn't in a postback
    >> state)
    >>
    >> Try calling BindData() instad of dgNotes.DataBind() at the end of the
    >> DeleteCommand handler.
    >>
    >> HTH,
    >> Lars-Erik
    >>
    >> "Rudy" <> wrote in message
    >> news:...
    >> > Hello all!
    >> > I'm just trying to delete a row from in a datagrid. Getting the
    >> > following
    >> > error.
    >> > "System.ArgumentOutOfRangeException: Index was out of range. Must be
    >> > non-negative and less than the size of the collection. Parameter name:
    >> > index"
    >> >
    >> > Here is my code,
    >> >
    >> > Public Class frmNotesGrd
    >> > Inherits System.Web.UI.Page
    >> > Protected ConnString As String =
    >> > ConfigurationSettings.AppSettings("ConnString")
    >> >
    >> > #Region " Web Form Designer Generated Code "
    >> >
    >> > 'This call is required by the Web Form Designer.
    >> > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    >> > InitializeComponent()
    >> > Me.daNoteGrd = New System.Data.SqlClient.SqlDataAdapter
    >> > Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
    >> > Me.ConnNoteGrd = New System.Data.SqlClient.SqlConnection
    >> > Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
    >> > Me.DsNoteGrd1 = New NConline.dsNoteGrd
    >> > CType(Me.DsNoteGrd1,
    >> > System.ComponentModel.ISupportInitialize).BeginInit()
    >> > '
    >> > 'daNoteGrd
    >> > '
    >> > Me.daNoteGrd.InsertCommand = Me.SqlInsertCommand1
    >> > Me.daNoteGrd.SelectCommand = Me.SqlSelectCommand1
    >> > Me.daNoteGrd.TableMappings.AddRange(New
    >> > System.Data.Common.DataTableMapping() {New
    >> > System.Data.Common.DataTableMapping("Table", "Notes", New
    >> > System.Data.Common.DataColumnMapping() {New
    >> > System.Data.Common.DataColumnMapping("NoteID", "NoteID"), New
    >> > System.Data.Common.DataColumnMapping("ToUser", "ToUser"), New
    >> > System.Data.Common.DataColumnMapping("Body", "Body"), New
    >> > System.Data.Common.DataColumnMapping("Frm", "Frm"), New
    >> > System.Data.Common.DataColumnMapping("Date", "Date")})})
    >> > '
    >> > 'SqlInsertCommand1
    >> > '
    >> > Me.SqlInsertCommand1.CommandText = "INSERT INTO Notes(ToUser,
    >> > Body,
    >> > Frm, Date) VALUES (@ToUser, @Body, @Frm, @Date); " & _
    >> > "SELECT NoteID, ToUser, Body, Frm, Date FROM Notes"
    >> > Me.SqlInsertCommand1.Connection = Me.ConnNoteGrd
    >> > Me.SqlInsertCommand1.Parameters.Add(New
    >> > System.Data.SqlClient.SqlParameter("@ToUser",
    >> > System.Data.SqlDbType.NVarChar,
    >> > 100, "ToUser"))
    >> > Me.SqlInsertCommand1.Parameters.Add(New
    >> > System.Data.SqlClient.SqlParameter("@Body",
    >> > System.Data.SqlDbType.NVarChar,
    >> > 200, "Body"))
    >> > Me.SqlInsertCommand1.Parameters.Add(New
    >> > System.Data.SqlClient.SqlParameter("@Frm",
    >> > System.Data.SqlDbType.NVarChar,
    >> > 100, "Frm"))
    >> > Me.SqlInsertCommand1.Parameters.Add(New
    >> > System.Data.SqlClient.SqlParameter("@Date",
    >> > System.Data.SqlDbType.DateTime,
    >> > 8, "Date"))
    >> > '
    >> > 'ConnNoteGrd
    >> > '
    >> > Me.ConnNoteGrd.ConnectionString = "workstation
    >> > id=LOCALHOST;packet
    >> > size=4096;user id=Tesla;data source=NCONLINE;pers" & _
    >> > "ist security info=False;initial catalog=Forums"
    >> > '
    >> > 'SqlSelectCommand1
    >> > '
    >> > Me.SqlSelectCommand1.CommandText = "SELECT NoteID, ToUser, Body,
    >> > Frm, Date FROM Notes"
    >> > Me.SqlSelectCommand1.Connection = Me.ConnNoteGrd
    >> > '
    >> > 'DsNoteGrd1
    >> > '
    >> > Me.DsNoteGrd1.DataSetName = "dsNoteGrd"
    >> > Me.DsNoteGrd1.Locale = New
    >> > System.Globalization.CultureInfo("en-US")
    >> > CType(Me.DsNoteGrd1,
    >> > System.ComponentModel.ISupportInitialize).EndInit()
    >> >
    >> > End Sub
    >> > Protected WithEvents daNoteGrd As
    >> > System.Data.SqlClient.SqlDataAdapter
    >> > Protected WithEvents SqlSelectCommand1 As
    >> > System.Data.SqlClient.SqlCommand
    >> > Protected WithEvents SqlInsertCommand1 As
    >> > System.Data.SqlClient.SqlCommand
    >> > Protected WithEvents ConnNoteGrd As
    >> > System.Data.SqlClient.SqlConnection
    >> > Protected WithEvents DsNoteGrd1 As NConline.dsNoteGrd
    >> > Protected WithEvents dgNotes As System.Web.UI.WebControls.DataGrid
    >> > Protected WithEvents lblUser As System.Web.UI.WebControls.Label
    >> > Protected WithEvents lblPagingInfo As
    >> > System.Web.UI.WebControls.Label
    >> >
    >> > 'NOTE: The following placeholder declaration is required by the Web
    >> > Form
    >> > Designer.
    >> > 'Do not delete or move it.
    >> > Private designerPlaceholderDeclaration As System.Object
    >> >
    >> > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    >> > System.EventArgs) Handles MyBase.Init
    >> > 'CODEGEN: This method call is required by the Web Form Designer
    >> > 'Do not modify it using the code editor.
    >> > InitializeComponent()
    >> > End Sub
    >> >
    >> > #End Region
    >> >
    >> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    >> > System.EventArgs) Handles MyBase.Load
    >> > lblUser.Text = Session("UserNm")
    >> > If Not Page.IsPostBack Then
    >> > BindData()
    >> > End If
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> > End Sub
    >> >
    >> > Sub BindData()
    >> > ConnNoteGrd = New SqlConnection(ConnString)
    >> > Dim strQse As String
    >> > strQse = "SELECT * FROM Notes Where ToUser ='" + lblUser.Text +
    >> > "'
    >> > ORDER by Date"
    >> > Dim cmdNoteGrd As New SqlCommand(strQse, ConnNoteGrd)
    >> >
    >> > Dim daNotegrd As New SqlDataAdapter
    >> > daNotegrd.SelectCommand = cmdNoteGrd
    >> > ConnNoteGrd.Open()
    >> >
    >> > Dim dsNoteGrd As DataSet = New DataSet
    >> > daNotegrd.Fill(dsNoteGrd, "Notes")
    >> >
    >> > ConnNoteGrd.Close()
    >> >
    >> > dgNotes.DataSource = dsNoteGrd
    >> > dgNotes.DataBind()
    >> >
    >> > ConnNoteGrd.Close()
    >> >
    >> > End Sub
    >> > Sub ShowPageInfo()
    >> > 'This sub didsplays pageing info in apropiate label
    >> > lblPagingInfo.Text = "DispalyingPage " &
    >> > (dgNotes.CurrentPageIndex
    >> > +
    >> > 1).ToString() & " of " & dgNotes.PageCount
    >> > End Sub
    >> >
    >> >
    >> > Private Sub dgNotes_DeleteCommand(ByVal source As Object, ByVal e As
    >> > System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    >> > dgNotes.DeleteCommand
    >> >
    >> > dgNotes.EditItemIndex = -1
    >> >
    >> > Dim NoteID As Integer
    >> > NoteID = dgNotes.DataKeys(e.Item.ItemIndex)
    >> >
    >> > Dim strDelete As String
    >> > strDelete = "DELETE FROM Notes WHERE NoteID = @noteIDParam"
    >> >
    >> > Dim cmdDel As New SqlCommand(strDelete, ConnNoteGrd)
    >> >
    >> > Dim NoteIDParam As New SqlParameter("@noteIDParam",
    >> > SqlDbType.Int,
    >> > 4)
    >> > NoteIDParam.Value = NoteID
    >> > cmdDel.Parameters.Add(NoteIDParam)
    >> >
    >> > ConnNoteGrd.Open()
    >> > cmdDel.ExecuteNonQuery()
    >> > dgNotes.DataBind()
    >> > ConnNoteGrd.Close()
    >> >
    >> > End Sub
    >> >
    >> > Private Sub dgNotes_PageIndexChanged(ByVal source As Object, ByVal e
    >> > As
    >> > System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    >> > dgNotes.PageIndexChanged
    >> > dgNotes.EditItemIndex = -1
    >> >
    >> > dgNotes.CurrentPageIndex = e.NewPageIndex
    >> > BindData
    >> > End Sub
    >> >
    >> > If somebody could take a look, and point me in the right direction,
    >> > that
    >> > would be great.
    >> > My table name in SQL is called NOTES, witht he following
    >> > noteID int 4
    >> > ToUser nvarchar 100
    >> > Body nvarchar 200
    >> > Frm nvarchar 100
    >> > Date datetime 8
    >> >
    >> > TIA!!!
    >> >
    >> > Rudy

    >>
    >>
    >>
    Lars-Erik Aabech, Jul 6, 2005
    #4
  5. Thanks Lars!

    I think that was it, I also noticed I never made note ID a KEY. Now I'm
    geting a login error, but I think I'll be able to fixthat pretty quicly. If I
    forgot to a put a Key in last night, God knows what else I forgot to do. LOL

    Thanks agian for your help!!!!

    Rudy

    "Lars-Erik Aabech" wrote:

    > Hi again!
    >
    > Then my answer was incorrect. :)
    > Have you set the DataKeyField attribute of the datagrid?
    >
    > Like this:
    > <asp:DataGrid id="dgNotes" runat="Server" DataKeyField="noteID"
    > ....>...</datagrid>
    >
    > Lars-Erik
    >
    >
    > "Rudy" <> wrote in message
    > news:...
    > > Hi Lars!
    > >
    > > This is the line I get therror
    > > Line 119: NoteID = dgNotes.DataKeys(e.Item.ItemIndex)
    > > I'll try what you suggested and let you know.
    > > Thanks!
    > >
    > > "Lars-Erik Aabech" wrote:
    > >
    > >> Hi!
    > >>
    > >> I'm not entirely sure, (since you didn't provide the line number ;) ),
    > >> but
    > >> it looks like the exception is thrown when you try to rebind the table
    > >> after
    > >> deleting the row. (Might be a dropdownlist in your grid?)
    > >>
    > >> When you call dgNotes.DataBind in the DeleteCommand handler, your data
    > >> source is gone. (You're only filling it if the page isn't in a postback
    > >> state)
    > >>
    > >> Try calling BindData() instad of dgNotes.DataBind() at the end of the
    > >> DeleteCommand handler.
    > >>
    > >> HTH,
    > >> Lars-Erik
    > >>
    > >> "Rudy" <> wrote in message
    > >> news:...
    > >> > Hello all!
    > >> > I'm just trying to delete a row from in a datagrid. Getting the
    > >> > following
    > >> > error.
    > >> > "System.ArgumentOutOfRangeException: Index was out of range. Must be
    > >> > non-negative and less than the size of the collection. Parameter name:
    > >> > index"
    > >> >
    > >> > Here is my code,
    > >> >
    > >> > Public Class frmNotesGrd
    > >> > Inherits System.Web.UI.Page
    > >> > Protected ConnString As String =
    > >> > ConfigurationSettings.AppSettings("ConnString")
    > >> >
    > >> > #Region " Web Form Designer Generated Code "
    > >> >
    > >> > 'This call is required by the Web Form Designer.
    > >> > <System.Diagnostics.DebuggerStepThrough()> Private Sub
    > >> > InitializeComponent()
    > >> > Me.daNoteGrd = New System.Data.SqlClient.SqlDataAdapter
    > >> > Me.SqlInsertCommand1 = New System.Data.SqlClient.SqlCommand
    > >> > Me.ConnNoteGrd = New System.Data.SqlClient.SqlConnection
    > >> > Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
    > >> > Me.DsNoteGrd1 = New NConline.dsNoteGrd
    > >> > CType(Me.DsNoteGrd1,
    > >> > System.ComponentModel.ISupportInitialize).BeginInit()
    > >> > '
    > >> > 'daNoteGrd
    > >> > '
    > >> > Me.daNoteGrd.InsertCommand = Me.SqlInsertCommand1
    > >> > Me.daNoteGrd.SelectCommand = Me.SqlSelectCommand1
    > >> > Me.daNoteGrd.TableMappings.AddRange(New
    > >> > System.Data.Common.DataTableMapping() {New
    > >> > System.Data.Common.DataTableMapping("Table", "Notes", New
    > >> > System.Data.Common.DataColumnMapping() {New
    > >> > System.Data.Common.DataColumnMapping("NoteID", "NoteID"), New
    > >> > System.Data.Common.DataColumnMapping("ToUser", "ToUser"), New
    > >> > System.Data.Common.DataColumnMapping("Body", "Body"), New
    > >> > System.Data.Common.DataColumnMapping("Frm", "Frm"), New
    > >> > System.Data.Common.DataColumnMapping("Date", "Date")})})
    > >> > '
    > >> > 'SqlInsertCommand1
    > >> > '
    > >> > Me.SqlInsertCommand1.CommandText = "INSERT INTO Notes(ToUser,
    > >> > Body,
    > >> > Frm, Date) VALUES (@ToUser, @Body, @Frm, @Date); " & _
    > >> > "SELECT NoteID, ToUser, Body, Frm, Date FROM Notes"
    > >> > Me.SqlInsertCommand1.Connection = Me.ConnNoteGrd
    > >> > Me.SqlInsertCommand1.Parameters.Add(New
    > >> > System.Data.SqlClient.SqlParameter("@ToUser",
    > >> > System.Data.SqlDbType.NVarChar,
    > >> > 100, "ToUser"))
    > >> > Me.SqlInsertCommand1.Parameters.Add(New
    > >> > System.Data.SqlClient.SqlParameter("@Body",
    > >> > System.Data.SqlDbType.NVarChar,
    > >> > 200, "Body"))
    > >> > Me.SqlInsertCommand1.Parameters.Add(New
    > >> > System.Data.SqlClient.SqlParameter("@Frm",
    > >> > System.Data.SqlDbType.NVarChar,
    > >> > 100, "Frm"))
    > >> > Me.SqlInsertCommand1.Parameters.Add(New
    > >> > System.Data.SqlClient.SqlParameter("@Date",
    > >> > System.Data.SqlDbType.DateTime,
    > >> > 8, "Date"))
    > >> > '
    > >> > 'ConnNoteGrd
    > >> > '
    > >> > Me.ConnNoteGrd.ConnectionString = "workstation
    > >> > id=LOCALHOST;packet
    > >> > size=4096;user id=Tesla;data source=NCONLINE;pers" & _
    > >> > "ist security info=False;initial catalog=Forums"
    > >> > '
    > >> > 'SqlSelectCommand1
    > >> > '
    > >> > Me.SqlSelectCommand1.CommandText = "SELECT NoteID, ToUser, Body,
    > >> > Frm, Date FROM Notes"
    > >> > Me.SqlSelectCommand1.Connection = Me.ConnNoteGrd
    > >> > '
    > >> > 'DsNoteGrd1
    > >> > '
    > >> > Me.DsNoteGrd1.DataSetName = "dsNoteGrd"
    > >> > Me.DsNoteGrd1.Locale = New
    > >> > System.Globalization.CultureInfo("en-US")
    > >> > CType(Me.DsNoteGrd1,
    > >> > System.ComponentModel.ISupportInitialize).EndInit()
    > >> >
    > >> > End Sub
    > >> > Protected WithEvents daNoteGrd As
    > >> > System.Data.SqlClient.SqlDataAdapter
    > >> > Protected WithEvents SqlSelectCommand1 As
    > >> > System.Data.SqlClient.SqlCommand
    > >> > Protected WithEvents SqlInsertCommand1 As
    > >> > System.Data.SqlClient.SqlCommand
    > >> > Protected WithEvents ConnNoteGrd As
    > >> > System.Data.SqlClient.SqlConnection
    > >> > Protected WithEvents DsNoteGrd1 As NConline.dsNoteGrd
    > >> > Protected WithEvents dgNotes As System.Web.UI.WebControls.DataGrid
    > >> > Protected WithEvents lblUser As System.Web.UI.WebControls.Label
    > >> > Protected WithEvents lblPagingInfo As
    > >> > System.Web.UI.WebControls.Label
    > >> >
    > >> > 'NOTE: The following placeholder declaration is required by the Web
    > >> > Form
    > >> > Designer.
    > >> > 'Do not delete or move it.
    > >> > Private designerPlaceholderDeclaration As System.Object
    > >> >
    > >> > Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
    > >> > System.EventArgs) Handles MyBase.Init
    > >> > 'CODEGEN: This method call is required by the Web Form Designer
    > >> > 'Do not modify it using the code editor.
    > >> > InitializeComponent()
    > >> > End Sub
    > >> >
    > >> > #End Region
    > >> >
    > >> > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > >> > System.EventArgs) Handles MyBase.Load
    > >> > lblUser.Text = Session("UserNm")
    > >> > If Not Page.IsPostBack Then
    > >> > BindData()
    > >> > End If
    > >> >
    > >> >
    > >> >
    > >> >
    > >> >
    > >> >
    > >> > End Sub
    > >> >
    > >> > Sub BindData()
    > >> > ConnNoteGrd = New SqlConnection(ConnString)
    > >> > Dim strQse As String
    > >> > strQse = "SELECT * FROM Notes Where ToUser ='" + lblUser.Text +
    > >> > "'
    > >> > ORDER by Date"
    > >> > Dim cmdNoteGrd As New SqlCommand(strQse, ConnNoteGrd)
    > >> >
    > >> > Dim daNotegrd As New SqlDataAdapter
    > >> > daNotegrd.SelectCommand = cmdNoteGrd
    > >> > ConnNoteGrd.Open()
    > >> >
    > >> > Dim dsNoteGrd As DataSet = New DataSet
    > >> > daNotegrd.Fill(dsNoteGrd, "Notes")
    > >> >
    > >> > ConnNoteGrd.Close()
    > >> >
    > >> > dgNotes.DataSource = dsNoteGrd
    > >> > dgNotes.DataBind()
    > >> >
    > >> > ConnNoteGrd.Close()
    > >> >
    > >> > End Sub
    > >> > Sub ShowPageInfo()
    > >> > 'This sub didsplays pageing info in apropiate label
    > >> > lblPagingInfo.Text = "DispalyingPage " &
    > >> > (dgNotes.CurrentPageIndex
    > >> > +
    > >> > 1).ToString() & " of " & dgNotes.PageCount
    > >> > End Sub
    > >> >
    > >> >
    > >> > Private Sub dgNotes_DeleteCommand(ByVal source As Object, ByVal e As
    > >> > System.Web.UI.WebControls.DataGridCommandEventArgs) Handles
    > >> > dgNotes.DeleteCommand
    > >> >
    > >> > dgNotes.EditItemIndex = -1
    > >> >
    > >> > Dim NoteID As Integer
    > >> > NoteID = dgNotes.DataKeys(e.Item.ItemIndex)
    > >> >
    > >> > Dim strDelete As String
    > >> > strDelete = "DELETE FROM Notes WHERE NoteID = @noteIDParam"
    > >> >
    > >> > Dim cmdDel As New SqlCommand(strDelete, ConnNoteGrd)
    > >> >
    > >> > Dim NoteIDParam As New SqlParameter("@noteIDParam",
    > >> > SqlDbType.Int,
    > >> > 4)
    > >> > NoteIDParam.Value = NoteID
    > >> > cmdDel.Parameters.Add(NoteIDParam)
    > >> >
    > >> > ConnNoteGrd.Open()
    > >> > cmdDel.ExecuteNonQuery()
    > >> > dgNotes.DataBind()
    > >> > ConnNoteGrd.Close()
    > >> >
    > >> > End Sub
    > >> >
    > >> > Private Sub dgNotes_PageIndexChanged(ByVal source As Object, ByVal e
    > >> > As
    > >> > System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
    > >> > dgNotes.PageIndexChanged
    > >> > dgNotes.EditItemIndex = -1
    > >> >
    > >> > dgNotes.CurrentPageIndex = e.NewPageIndex
    > >> > BindData
    > >> > End Sub
    > >> >
    > >> > If somebody could take a look, and point me in the right direction,
    > >> > that
    > >> > would be great.
    > >> > My table name in SQL is called NOTES, witht he following
    > >> > noteID int 4
    > >> > ToUser nvarchar 100
    > >> > Body nvarchar 200
    > >> > Frm nvarchar 100
    > >> > Date datetime 8
    > >> >
    > >> > TIA!!!
    > >> >
    > >> > Rudy
    > >>
    > >>
    > >>

    >
    >
    >
    =?Utf-8?B?UnVkeQ==?=, Jul 6, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Clark Choi
    Replies:
    1
    Views:
    4,517
    Alvin Bruney
    Jan 10, 2004
  2. =?Utf-8?B?UnVkeQ==?=

    Newbie-Index out of range error

    =?Utf-8?B?UnVkeQ==?=, Feb 2, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    434
    =?Utf-8?B?UnVkeQ==?=
    Feb 3, 2005
  3. =?Utf-8?B?RGF2ZQ==?=

    Intermittent "Index was out of range." error

    =?Utf-8?B?RGF2ZQ==?=, Jul 20, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    761
    =?Utf-8?B?RGF2ZQ==?=
    Jul 21, 2005
  4. Pat
    Replies:
    0
    Views:
    453
  5. Pat
    Replies:
    0
    Views:
    10,757
Loading...

Share This Page