i have a database det1,and a table in it (table2) like below
field1 field2 field3
12 13 14
15 16 17
18 19 20


the datatypes are all "Text"

i need to access the row whose field1=15


when i use the following code ,i get the error
[red]No value given for one or more required parameters[/red]
with the line
sa.Fill(ds, "table2")
highlighted


Public Function GetPupil(ByVal id As Integer)

Dim conn As OleDb.OleDbConnection = GetConnection()
Dim i As Integer
i = 15
Try
Dim sql As String = "Select * from table2 WHERE Field1=" & i.ToString()Dim sa As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(sql, conn)
Dim ds As New DataSet

Try
sa.Fill(ds, "table2")

Finally
sa.Dispose()
End Try
Return ds

Finally
conn.Close()
conn.Dispose()
End Try

End Function


is the line
Dim sql As String = "Select * from table2 WHERE Field1=" & i.ToString()
correct?? or is there anything else wrong?
can anyone help me with this?
thnking in advance