Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27153

VS 2008 How do you pass the value in a textbox to a TableAdapter?

$
0
0
Hi All,

I have a TableAdapter which connects to an Oracle database and works fine when attached to a datagrid.
What I need to do is pass the contents of a textbox to the query attached to the tableadapter. This is my current query:

SELECT CODE, PROPNO, VISITNAME, BEAMLINE, TITLE, FULLNAME, FEDID, ESTABLISHMENT, VISITSTART, STARTTIME, VISITTEND, ENDTIME
FROM NONPRIV.VW_LOCAL_VISITINFO
WHERE (BEAMLINE = 'B23')
ORDER BY VISITSTART

I've seen some examples on this forum that use a syntax like this:

WHERE (BEAMLINE = 'B23') and FEDID= @FEDID

but where would I define and assign a value to @FEDID (FEDID being column I need to filter the query with).

I fine working with databases in VBA where I used DAO etc, but have no idea when it comes to .NET and adapters.

Thanks

Kristian

Viewing all articles
Browse latest Browse all 27153

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>