Dear Team,

I have a question regarding LINQ 2 SQL and data integration with textbox:

I have one textbox and button on my form, one stored procedure and LINQ 2 SQL class file in my project,

I want that when I hit button, my store procedure run the SQL query and show me the result in textbox.

I am using VB 2008 and Visual Basic for programing.

Kindly guide me.

Recommended Answers

All 2 Replies

I have following VB code on command buton, and its working perfectly with DataGridView, but not working with textbox:

Dim db As New RegisterDataContext
        Dim query = From r In db.AuthDetails _
        Where r.Username = TextBox1.Text _
        Select New With {r.UserRights}
        DataGridView1.DataSource = query

My Query is giving single value and I want to show that value in textbox.
Kindly guide me

What happens if you do something like?:

Textbox1.Text = query.ToString()
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.