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

  • Home
  • SEARCH
  • 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 am doing an Financial Winforms application and am having some trouble with the
I'm having trouble with global variables in php. I have a $screen var set
I'm having trouble doing an aggregation query on a many-to-many related field. Here are
First time doing Python in a while, and I'm having trouble doing a simple
Here is a question for the Excel / math-wizards. I'm having trouble doing a
I'm having a lot of trouble doing something very simple. I have a viewController
I'm having trouble compiling D programs in Code::Blocks. Here's what I'm doing: In accordance
I'm having trouble with updating final_id by selecting the highest final_id already in table
Having trouble linking the Stomp.framework into an iPhone SDK application. http://code.google.com/p/stompframework/ I follow the
Im having trouble using a .NET COM in vb6, It compiles ok and I

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.