473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to get data from SQL server 2005?

how can we display data from SQL server table into web form(textbox)?
Dec 29 '07 #1
3 1749
OuTCasT
374 256MB
how can we display data from SQL server table into web form(textbox)?

Why dont u use a gridview or a formsview ???
Then set the datasource to your database....
Jan 4 '08 #2
OuTCasT
374 256MB
how can we display data from SQL server table into web form(textbox)?

Expand|Select|Wrap|Line Numbers
  1. Dim sqlCon As SqlConnection
  2.         sqlCon = New SqlConnection(sqlConnectionString)
  3.  
  4.         ' Creat the command against SQL database(retrieving the value u want)
  5.  
  6. Dim sqlCommand As New SqlCommand("select [column] from [table] where [column] = [value u want]", sqlCon)
  7.  
  8.    ' Open the COnnection
  9.  
  10.          sqlCon.Open()
  11.                ' set ur textbox value to the value returned by the command
  12.  
  13.          TextBox8.Text = sqlCommand.ExecuteScalar()
  14.        sqlCon.close()
  15.  
Jan 4 '08 #3
can you please tell me for C# web forms?
Jan 4 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
4
by: SQLJunkie | last post by:
Here is an issue that has me stumped for the past few days. I have a table called MerchTran. Among various columns, the relevant columns for this issue are: FileDate datetime , SourceTable...
9
by: Vorpal | last post by:
Here is a small sample of data from a table of about 500 rows (Using MSSqlserver 2000) EntryTime Speed Gross Net ------------------ ----- ----- 21:09:13.310 0 0 0 21:09:19.370 9000 ...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
0
by: acwomble | last post by:
I am working with a database on another system via a ssh tunnel using plink. We have setup an alias the local system for the remote database. I am able to connect and work from within Visual...
2
by: Marcus | last post by:
(Appologies if this group isn't the best place for this post) Is it possible to use DAO 3.6 to access binary data (varbinary(max)) in Sql Server 2005? I have images and sound in a Sql 2005 DB...
3
by: SAL | last post by:
Hi, I have Microsoft Enterprise Library 2005 installed on my local system. I'm developing in C# using Visual Studio 2003 IDE with framework 1.1. I am automating a process that will use a DLL...
1
by: Greg Collins [Microsoft MVP] | last post by:
I am starting a project where I will be using the XML data type in SQL Server 2005, and ASP.NET to display and update the content of the XML. I've been digging around for a bit trying to find some...
1
by: denis.carabadjac | last post by:
I have Informix 9.4TC6 and SQL Server 2005. DB_LOCALE in Informix DB is en_US.utf8 (en_US.57372). First, I created DSN to Informix. Then tried to get data with WinSql tool and it works fine....
1
by: LitaOsiris | last post by:
Hi all, I'm getting the following error: The type 'System.Data.Common.DbConnection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Data,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.