Skip to content
Advertisement

Why am I getting insufficient parameters supplied to the command error?

I have trying to read a database and display it into a datagridview, but I keep getting the error, using Windows Forms and SQLite:

That’s the code I’m using, but what is the issue?

I have tried removing the concatenation, and I’ve tried changing the parameters method too:

I tried with and without the executenonquery() each time.

Advertisement

Answer

I have finally got it working. The issue was with the line:

I had to delete this line and add the parameters to the actual adapter. And now it’s working.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement