This is my first post on this forum. Apologies in advance if this isn' the right place or there isn't enough info.
I'm basically trying to retreive an ID from a quesry string...
What I'm having trouble with is defining the variable and referencing the querystring in the SQL select statement i.e.
"select * from tblNuts where fldNutType = @nuttype"
This is the working code below...
Function getTheData() As DataTable Dim DS As New DataSet() Dim strConnect As New SQLConnection ("Server=credentials") Dim objSQLAdapter As New SQLDataAdapter("SELECT * FROM tblnuts", strConnect) objSQLAdapter.Fill(DS, "tblNuts") Return DS.Tables("tblNuts").Copy End Function
Many thanks in advance