473,387 Members | 1,542 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,387 software developers and data experts.

VB Code to retrieve 1 value from sql database

Hi how do i do that in code please
thanks
Feb 2 '06 #1
3 938
dim dbconn as new System.Data.SqlClient.SqlConnection(ConnString)
dim dbCommand as new System.Data.SqlClient.SqlCommand(dbconn)

.... put your query code here

' *** here is the important line ***
TheOneValue = dbCommand.ExecuteScalar()

" Ashe Sjedic" <to*******@doughpddu.com> wrote in message
news:7r********************@comcast.com...
Hi how do i do that in code please
thanks

Feb 2 '06 #2
Ashe,
the Quickstarts are your friend:
http://samples.gotdotnet.com/quickst...ataaccess.aspx

They also install on your local machine, if you choose that option.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ashe Sjedic" wrote:
Hi how do i do that in code please
thanks

Feb 2 '06 #3
Thanks a lot you guys.


Feb 2 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: viktor9990 | last post by:
I have a page called CustomerSlides.aspx which contains an iframe(with the source Lookupage.aspx). The iframe page will look continuously in the database to see if a value has changed: if it is...
6
by: Salvani Langosta | last post by:
In an Access 97 database, I use serveral global variables that hold information about the database, for example: gstrFileServer - holds the server root where the database is stored...
11
by: Lues | last post by:
Hi, I'm trying to protect some data in tables with encription (you know why, don't you ;)) I must confess that I'm not very expirienced in writing code, especially encription code. Can any...
0
by: JMCN | last post by:
i have been running into some ftp problems. when i run the ftp, the log indicates that it has been ftp'd. here is my ftp log: USER XX PASS XXX CONNECT XXX.dns.com CD $1$DKB101: GET...
2
by: WhiteEagl | last post by:
Hello, I would need some help with this identity column problem in SQLServer. I have a database with two tables. The Parent table has an Identity column. Parent (ParentID IDENTITY, Name)...
4
by: John Holmes | last post by:
I'm using data to rename some web controls on a form that uses a repeater contol and so it can have mulitple instances of the same control set. The controls get renamed (thanks to Steven Cheng's...
7
by: Donald Grove | last post by:
Is it possible to retrieve field properties from a table in access2000 using code? I have tried: " dim dbs as dao.database dim tbl as dao.tabledef dim fld as dao.field dim prop as...
4
by: Larry Grady | last post by:
Anyone up for a challenge? I've been struggling with this for a few days and was hoping someone could help me. Pouring through all the messageboards I just can't find the solution. We have a...
6
by: fpcreator2000 | last post by:
Hello everyone. I'm having problems with a page I've created that is used to insert data into a database. It uploads two files into two distinct folder, and it takes the filenames and inserts...
2
by: zek2005 | last post by:
Hi! I have a value loaded in a database as following: &lt;p&gt;&lt;strong&gt;test&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;test 2&lt;/ strong&gt;&lt;em&gt;&lt;strong&gt;questions&lt;img alt=&quot;&quot;...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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,...

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.