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 7196651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:49:09+00:00 2026-05-28T20:49:09+00:00

I work with VB.NET (Windows Forms) and database in AS400 iSeries. I wont to

  • 0

I work with VB.NET (Windows Forms) and database in AS400 iSeries. I wont to make an Update in one table. I have this code:

    query.Append("Update CLAIMSTATE ")
    query.Append("SET CST_CODE = @cst_code, ")
    query.Append("CST_LABEL = @cst_label, ")
    query.Append("CST_POINTS = @cst_points ")
    query.Append("WHERE CST_ID = @cst_id ")

    Dim command As New OdbcCommand(query.ToString(), con)   

    command.Parameters.Add("@cst_id", OdbcType.BigInt).Value = row.Cells(0).Value
    command.Parameters.Add("@cst_code", OdbcType.Char).Value = row.Cells(1).Value & ""
    command.Parameters.Add("@cst_label", OdbcType.NVarChar).Value = row.Cells(2).Value & ""
    command.Parameters.Add("@cst_points", OdbcType.Decimal).Value = row.Cells(3).Value
    command.ExecuteNonQuery()

In this case I obtain this error:
ERROR [42000] [IBM][System i Access ODBC-Treiber][DB2 fur i5/OS]SQL0113 – Name @CST_CODE not allowed.

Can anybody help me?

Thank’s in advance.

  • 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-28T20:49:10+00:00Added an answer on May 28, 2026 at 8:49 pm

    OdbcCommand doesn’t support named parameters.

    Dim command As OdbcCommand = con.CreateCommand()
    command.CommandText = "UPDATE CLAIMSTATE " & _
        "SET CST_CODE = ?, CST_LABEL = ?, CST_POINTS = ? WHERE CST_ID = ?"
    command.Parameters.Add("@cst_code", OdbcType.Char).Value = row.Cells(1).Value & ""
    command.Parameters.Add("@cst_label", OdbcType.NVarChar).Value = row.Cells(2).Value & ""
    command.Parameters.Add("@cst_points", OdbcType.Decimal).Value = row.Cells(3).Value
    command.Parameters.Add("@cst_id", OdbcType.BigInt).Value = row.Cells(0).Value
    command.ExecuteNonQuery()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im using c# .net windows form application. I have created a database which has
I have a .net windows forms application that needs to open directly to the
I have a .Net windows forms application, and I need to load values into
Is there a way to make long items wrap in a .net windows forms
I'm building a small .NET Windows Forms application that talks to an Oracle database.
I have recently moved to .net 3.0 (windows forms, C#). I want to know
I am developing a Windows Forms application (.NET 2.0, VS 2005). I have a
In a VB.Net Windows Service I'm currently pooling units of work with: ThreadPool.QueueUserWorkItem(operation, nextQueueID)
Does .NET Compact Framework 3.5 work on Windows Mobile 2003 SE without limitations?
We work extensively in the .Net Compact Framework and Windows Mobile. I've seen plenty

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.