Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4045986
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:30:18+00:00 2026-05-20T13:30:18+00:00

What i am having trouble doing is set the current parameter to the current

  • 0

What i am having trouble doing is set the current parameter to the current row at a specific column like e.row[column index]

    For Each trow As TableRow In table.Rows

            cmd1.CommandText = "dbo.directway"
            cmd1.CommandType = CommandType.StoredProcedure
            cmd1.Connection = conn



            cmd1.Parameters.AddWithValue("@tour", trow(0))
            cmd1.Parameters.AddWithValue("@tourname", trow(1))
            cmd1.Parameters.AddWithValue("@taskname", trow(2))
            cmd1.Parameters.AddWithValue("@deptdate", trow(3))
            cmd1.Parameters.AddWithValue("@duedate", trow(4))
            cmd1.Parameters.AddWithValue("@tasktype", trow(5))
            cmd1.Parameters.AddWithValue("@desc", trow(8))
            cmd1.Parameters.AddWithValue("@agent", trow(6))
            cmd1.Parameters.AddWithValue("@completed", trow(7))


            conn.Open()
            cmd1.BeginExecuteNonQuery()
            conn.Close()



        Next

Class ‘System.Web.UI.WebControls.TableRow’ cannot be indexed because it has no default property.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T13:30:18+00:00Added an answer on May 20, 2026 at 1:30 pm

    There are so many things wrong here …

    First, you have a Command object named cmd1, but you are adding parameters to an object named cmd. Turn on Option Explicit. Second, VB.NET uses parenthesis around indexes, not square brackets. Third, you are calling variable e instead of trow, and you should be referencing trow(0), trow(1), etc. Fix these things up and then post an update.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble doing an aggregation query on a many-to-many related field. Here are
I am having trouble doing a reverse URL lookup for Django-generated feeds. I have
Whilst doing exam revision I am having trouble answering the following question from the
I am having trouble programmatically removing stacks from a view. I am doing things
I know I'm doing this a bad way... but I'm having trouble seeing any
I am doing an Financial Winforms application and am having some trouble with the
I'm doing my first C++ - Qt4 application and I'm having some trouble connecting
Having trouble with the following segment of code. I'm getting a parameter count mismatch.
I would like to set the testConnectionOnCheckin property for c3p0. However I am having
I'm trying to build a breadcrumb here and I'm having some trouble doing it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.