Click to See Complete Forum and Search --> : DataAdapter.Fill question


homer13j
April 9th, 2003, 12:51 PM
I wrote a function that returns a database table in a DataSet. It works fine when I return the entire table:

strSQL = "SELECT * FROM Table"

...

da.Fill(ds, "Table")

When I try to get only one record from the table:

strSQL = "SELECT * FROM Table WHERE id = " & nID

I get an error "No value given for one or more required parameters" for the call to DataAdapter.Fill.

There are 6 different overloads for the Fill function. Can anyone tell me what I'm doing wrong?

hellomadhu
April 10th, 2003, 06:29 AM
problem should be with the field name in the where class.

have u checked ur field name ?

do check out the datatype of the id field ?

if the problem continues , post ur table structure so that it would be easy to identify the problem