Hi,

i need to display a query result in textbox. can you please show me how to do this, here is the query:

Dim CouponDes As String = Convert.ToString(Me.cboDescription.SelectedValue)
Dim sql As String = "select Code from QueAns where Description = '" + CouponDes

thanks

Recommended Answers

All 2 Replies

You need to 'bind' the result of your SQL query to the textbox. This can be done using databindings.

Find the code snippet here- http://dotnet.tekyt.info/?tag=databind

thanks useful link

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.