473,480 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Forgive me, I'm trying

Hello friends.

I would like to pull the value of one field from a local database and
display it on a page.
I spent an hour looking for the solution. I feel that is more than enough
dues to pay to the computer in the sky.

I don't want to use a dataReader or a sqlDepleter or a gridViewRepeater or a
SqlAdapterDefeater or listView or a FormViewDeleter or WebSplitterDataPart
or a dataGridViewForm or a FormGridDataCheater or BeechaMeaterRepeater or a
saladShooter or a validityDecoder or a DataGridRepeatForm or DataChair or an
UnfoldingWebFormPart or a lightWeightPewterRepeater or a JavaMagnet or
beanPoleGiantWigHoleBananaShoeHornWebBlowHorn or a
CatchOfTheDayPress1forWhatTheHeckCommand or a
ExceptionWebFormInstanceSplitter or an FoldingSeatBackChairResourceToolKit.

Is there anyway I can play the "Show me how this is less code" card and just
be shown how I can get this info and stick it, yes stick it, in a label or a
Hello World Message box?

Thanks for letting me play too.

Feb 7 '06 #1
5 1053
Go read a book.

"James Woody" <ds@dimdbot.com> wrote in message
news:g4******************************@comcast.com. ..
Hello friends.

I would like to pull the value of one field from a local database and
display it on a page.
I spent an hour looking for the solution. I feel that is more than enough
dues to pay to the computer in the sky.

I don't want to use a dataReader or a sqlDepleter or a gridViewRepeater or
a SqlAdapterDefeater or listView or a FormViewDeleter or
WebSplitterDataPart or a dataGridViewForm or a FormGridDataCheater or
BeechaMeaterRepeater or a saladShooter or a validityDecoder or a
DataGridRepeatForm or DataChair or an UnfoldingWebFormPart or a
lightWeightPewterRepeater or a JavaMagnet or
beanPoleGiantWigHoleBananaShoeHornWebBlowHorn or a
CatchOfTheDayPress1forWhatTheHeckCommand or a
ExceptionWebFormInstanceSplitter or an
FoldingSeatBackChairResourceToolKit.

Is there anyway I can play the "Show me how this is less code" card and
just be shown how I can get this info and stick it, yes stick it, in a
label or a Hello World Message box?

Thanks for letting me play too.

Feb 7 '06 #2
I did, Dick.

Now answer the question or get out of the way. Put on some pants and go do
somehing
Feb 7 '06 #3
Imagine if you will, Jimbo, some jester posting a question to a newsgroup
along the lines of "How do I drive a car?". It's really quite simple to
drive a car, but to try to explain to a person who hasn't a slightest clue
would be an ominous task. There are so many basics that most of us drivers
take for granted, that you just wouldn't be able to assume was in place when
dealing with such an imbecile. You couldn't assume the guy had eyes, arms
and legs, or an I.Q. above 50. I mean, where would you even start?

"James Woody" <ds@dimdbot.com> wrote in message
news:Tf********************@comcast.com...
I did, Dick.

Now answer the question or get out of the way. Put on some pants and go do
somehing

Feb 7 '06 #4
Sorry, Rick that I Called you Dick. I meant to say Rick. Honest.

Now here's something that I found. It's just like i said, only in VB.
I explained it well enough the first time
imports system.data
imports system.data.sqlclient
Dim cnn As New SqlConnection("User Id=MyUserID;Password=MyPassword;Initial
Catalog=DBName;Server=255.255.255.255")

'Modify the SQL string to match your criteria
Dim cmd As New SqlCommand("Select Name From TableName where Id = 0", cnn)

label.Text = cmd.ExecuteScalar

'Don't forget to clean up your connection and cmd objects by setting them to
nothing

Feb 7 '06 #5
Nothing is NOT enough.
If there IS a .dispose in ANY object, it's really recommended you call that.
Nothing does not close the connection perse in this object.
(I can tell :) )
"icurfmn8" <ds*@dimddbot.com> schreef in bericht
news:mZ********************@comcast.com...
Sorry, Rick that I Called you Dick. I meant to say Rick. Honest.

Now here's something that I found. It's just like i said, only in VB.
I explained it well enough the first time
imports system.data
imports system.data.sqlclient
Dim cnn As New SqlConnection("User Id=MyUserID;Password=MyPassword;Initial
Catalog=DBName;Server=255.255.255.255")

'Modify the SQL string to match your criteria
Dim cmd As New SqlCommand("Select Name From TableName where Id = 0", cnn)

label.Text = cmd.ExecuteScalar

'Don't forget to clean up your connection and cmd objects by setting them
to nothing

Feb 7 '06 #6

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

Similar topics

8
1928
by: Luis | last post by:
A dumb friday-afternoon-and-I-need-a-weekend question. I inherited an application that has code similar to: set conn = server.CreateObject("ADODB.Connection") set New_app =...
4
1895
by: Garry Freemyer | last post by:
I'm trying to convert this macro to a c# function but I have a big problem. It's on the LEFT side of an assignment statement and I am extremely flustered over this one because I'm a little rusty...
5
3609
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
17
1491
by: Sam Malone | last post by:
I am trying to get details from a database. I really want to use only native VS.NET managed code "stuff" (just cuz I want to) and avoid any interop stuff. So, I'm trying to do this without using...
0
11684
by: cwho.work | last post by:
Hi! We are using apache ibatis with our MySQL 5.0 database (using innodb tables), in our web application running on Tomcat 5. Recently we started getting a number of errors relating to...
0
6908
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7043
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
7081
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...
1
6737
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6921
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5336
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
179
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.