| |

VerySource

 Forgot password?
 Register
Search
Author: lawrencearab

Why can't my insertcommand get parameters automatically

[Copy link]

0

Threads

31

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-3-6 22:30:02
| Show all posts
I don't see any code to add lines in your code
newrow just generates a new row
rows.add (row)
Did you really add the rows to the DataSet, you did not add the new rows to the ROWS collection, not in the DATASET, update a bird
Reply

Use magic Report

3

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 Invalid IP Address

 Author| Post time: 2020-3-7 16:30:01
| Show all posts
I re-posted the code with add in the back.
Reply

Use magic Report

3

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 Invalid IP Address

 Author| Post time: 2020-3-7 20:15:01
| Show all posts
In the re-pasted code, I used the tableadapter generated during the binding. I can check in the breakpoint that my adapter can get parameters, but I can't insert the parameters into the database.
Reply

Use magic Report

0

Threads

14

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-6-2 07:15:01
| Show all posts
Try to take out the ID column in the instance of DataAdapter. When inserting a new row, manually set an ID and then update it. Pay attention to tracking the ID in the DataSet
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list