-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dale,
This is what I did to take the items selected in some ComboBoxes and
pass their SelectedValue to a SQL statement to filter a DataSet:
The SQL statement in the DataAdapter.SelectCommand.CommandText
SELECT
DISTINCT VerseText,
BookID AS BookKey,
ChapterID AS ChapterKey,
VerseID AS VerseKey,
ID
FROM
tblVerseText
WHERE
(VerseID = ?) AND
(ChapterID = ?) AND
(BookID = ?)
- -----------------------------------
The code executed to take the ValueMember and pass it to the SQL
statement:
daText.SelectCommand.Parameters("BookID").Value =
cmbBook.SelectedValue
daText.SelectCommand.Parameters("ChapterID").Value =
cmbChapter.SelectedValue
daText.SelectCommand.Parameters("VerseID").Value =
cmbVerse.SelectedValue
- -----------------------------------
Hope this helps,
Gary
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <
http://www.pgp.com>
iQA/AwUBP/IwNz8KnwrkurVSEQIIHwCg76M6IYiG/Dw0P1C91wjxRVLO/J0An0pW
McLJVXpa5mBIbgw3fYjGMozr
=Y72a
-----END PGP SIGNATURE-----