On a update (There is already a parameter with the name '@xxxxxxx' in this collection.)
Posted by: Paul Enright
Date: July 28, 2023 07:52AM

I am using VB.NET, Visual Studio 2022, Win 10

While trying to integrate MySQL into a framework that I did not create, I am getting the subject error. Let me try and create some context.
This framework started out as a wrapper for AccessDB, then SQL Server was added. Next came SQLite, CSV, XLS, AS400, etc.
There are a series of case statements that build a connect string for the connection. Then the needed 'DbProviderFactories' is created. Then a 'DataTable'(dt) is built 'DbCommand'(cmd)->'ExecuteReader'(reader as cmd.ExecteReader)->dt.Load(reader).

All this works and there the table is loaded. I can access the rows and fields. I can update a Row/Field. If I display the Row/Field I can see the change. But when I try and update the table, I get the subject error where @xxxxx is the name of the field I was trying to change.

The update is something like ...
_da as Common.DbDataAdapter from what was created via DbProviderFactories.

I can give more detail, but did not want to make the post any more confusing than I already did. :-)
Just let me know what might help make it more clear.

Options: ReplyQuote

Written By
On a update (There is already a parameter with the name '@xxxxxxx' in this collection.)
July 28, 2023 07:52AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.