Wrox Programmer Forums
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 25th, 2006, 08:50 AM
Authorized User
Join Date: Sep 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Textbox

How can I run a stored procedure and get that value to display in a textbox? I can get it to show in a datagrid by using:
        grdConsumer.DataSource = cmdNextSpecialist.ExecuteReader()
How do I get it to display in a textbox? I'm not passing through any parameters. It automatic runs when the page is open.

Alexander Nelson
Alexander Nelson
Old September 25th, 2006, 11:26 AM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

You can use Output Parameters and set the value of the text box to the that of the output parameter;

You could create a datareader object and loop through your returned result set ala:

While objdataReader.read
'Do something with the data
End While

You could bind the resultset to a memory resident datatable and loop through that datatable like this:

for each datarow in datatable.rows
'Do something with the data


--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

Similar Threads
Thread Thread Starter Forum Replies Last Post
TextBox Help iceman90289 C# 2005 6 April 6th, 2008 03:54 AM
pointing cursor from one textbox to other textbox lakshmi_annayappa ASP.NET 1.0 and 1.1 Basics 2 August 2nd, 2007 03:41 PM
help " in textbox mkb C# 2005 1 October 15th, 2006 03:08 PM
Masked TextBox & formatting TextBox melvik C# 1 September 22nd, 2003 11:01 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.