The Cellar  

Go Back   The Cellar > Main > Nothingland

Nothingland Something about nothing - game threads, diversions, time-wasters

Reply
 
Thread Tools Display Modes
Old 06-03-2010, 09:48 PM   #16
squirell nutkin
has a second hand user title
 
Join Date: Feb 2006
Location: in a Nut House
Posts: 2,017
The name of this thread is The Talking Threads.
(This is not your clever thread, these are not your beautiful threads)
__________________
And now I'm finished posting.
squirell nutkin is offline   Reply With Quote
Old 06-03-2010, 09:49 PM   #17
Shawnee123
Why, you're a regular Alfred E Einstein, ain't ya?
 
Join Date: Jun 2006
Posts: 21,206
Puh, yeah. This thread is the same as it ever was.
__________________
A word to the wise ain't necessary - it's the stupid ones who need the advice.
--Bill Cosby
Shawnee123 is offline   Reply With Quote
Old 06-03-2010, 11:17 PM   #18
HungLikeJesus
Only looks like a disaster tourist
 
Join Date: Feb 2007
Location: above 7,000 feet
Posts: 7,208
Having not bothered to read any of the preceding posts, I write a bad poem and link to a post that I wrote two years ago, in a style now outdated, hoping to bring attention to myself.
__________________
Keep Your Bodies Off My Lawn

SteveDallas's Random Thread Picker.
HungLikeJesus is offline   Reply With Quote
Old 06-04-2010, 12:30 AM   #19
toranokaze
I'm still a jerk
 
Join Date: Oct 2007
Location: Little Mexico
Posts: 1,817
This is the post were I point out the ovbuse and make a non sequestrate comment for a cheap chuckle,

Tautology thread. Never not true
__________________
"Without deviation from the norm progress is not possible." - Frank Zappa

It is the ignorance of ignorance that lead to the death of knowledge

The Virgin Mary does not weep for her son, for he is in paradise. She weeps for the world , for we are in suffering.
toranokaze is offline   Reply With Quote
Old 06-04-2010, 04:40 AM   #20
sexobon
I love it when a plan comes together.
 
Join Date: Oct 2009
Posts: 9,793
This is the application for a corrected title

Quote:
Originally Posted by lumberjim View Post
This is the title of the thread
--------------------------------------------------------
And this is the first post in the thread.
And this is the first quote in the thread.

Last edited by sexobon; 06-04-2010 at 04:49 AM. Reason: And this is the first edit in the thread
sexobon is offline   Reply With Quote
Old 06-04-2010, 08:25 AM   #21
ZenGum
Doctor Wtf
 
Join Date: Oct 2007
Location: Badelaide, Baustralia
Posts: 12,861
In this post I wander in a bit late, and attempt a play on words referring to a previous post. It isn't very funny.
__________________
Shut up and hug. MoreThanPretty, Nov 5, 2008.
Just because I'm nominally polite, does not make me a pussy. Sundae Girl.
ZenGum is offline   Reply With Quote
Old 06-04-2010, 09:24 AM   #22
classicman
barely disguised asshole, keeper of all that is holy.
 
Join Date: Nov 2007
Posts: 23,401
I do a quick google search and relate everything to the political spin involved in the subject.
__________________
"like strapping a pillow on a bull in a china shop" Bullitt
classicman is offline   Reply With Quote
Old 06-04-2010, 09:30 AM   #23
glatt
 
Join Date: Jul 2003
Location: Arlington, VA
Posts: 27,717
I fall for the troll and begin to compose a post in response, but come to my senses and delete it without posting.
glatt is offline   Reply With Quote
Old 06-04-2010, 09:33 AM   #24
Spexxvet
Makes some feel uncomfortable
 
Join Date: Dec 2005
Posts: 10,346
This is the post where I go into a serious thread and try to be comedic and end up posting something trite, like "this isn't a thread, it's a dolphin".
__________________
"I'm certainly free, nay compelled, to spread the gospel of Spex. " - xoxoxoBruce
Spexxvet is offline   Reply With Quote
Old 06-04-2010, 09:40 AM   #25
Cloud
...
 
Join Date: Feb 2007
Posts: 8,360
this is the post where I point out someone's spelling mistakes--just for their information, of course! I'm not a grammar-you-know-what, no!
__________________
"Guard your honor. Let your reputation fall where it will. And outlive the bastards!"
Cloud is offline   Reply With Quote
Old 06-04-2010, 09:48 AM   #26
Trilby
Slattern of the Swail
 
Join Date: Jul 2004
Posts: 15,654
This is where I wander in, eating an apple, wondering what the hell is going on and why am I always so late to the party? Then I wonder if I look like an attention whore and whatever happened to mari - did she starve to death in colorado? Is staceyV still crazy and involved with the russian mafia?

Then I get nostaglic.
__________________
In Barrie's play and novel, the roles of fairies are brief: they are allies to the Lost Boys, the source of fairy dust and ...They are portrayed as dangerous, whimsical and extremely clever but quite hedonistic.

"Shall I give you a kiss?" Peter asked and, jerking an acorn button off his coat, solemnly presented it to her.
—James Barrie


Wimminfolk they be tricksy. - ZenGum
Trilby is offline   Reply With Quote
Old 06-04-2010, 10:08 AM   #27
classicman
barely disguised asshole, keeper of all that is holy.
 
Join Date: Nov 2007
Posts: 23,401
This post contains the first spam link in the thread

This is the ETA - I inserted the link without actually seeing if it was a real link.
__________________
"like strapping a pillow on a bull in a china shop" Bullitt
classicman is offline   Reply With Quote
Old 06-04-2010, 10:40 AM   #28
glatt
 
Join Date: Jul 2003
Location: Arlington, VA
Posts: 27,717
Quote:
Originally Posted by Brianna View Post
Then I get nostaglic.
This is where I quote Bri, and get nostalgic too. I wonder if Rich still has those razor blades on his thumbs.
glatt is offline   Reply With Quote
Old 06-04-2010, 10:45 AM   #29
Shawnee123
Why, you're a regular Alfred E Einstein, ain't ya?
 
Join Date: Jun 2006
Posts: 21,206
This is the first youtube link, and it's also the theme to Garry's show.

__________________
A word to the wise ain't necessary - it's the stupid ones who need the advice.
--Bill Cosby
Shawnee123 is offline   Reply With Quote
Old 06-04-2010, 10:51 AM   #30
Shawnee123
Why, you're a regular Alfred E Einstein, ain't ya?
 
Join Date: Jun 2006
Posts: 21,206
Here is where I cut and paste some long-winded only slightly related to anything article, then nod knowingly about how many facts I know, here is also where I bold stuff that I am sure punctuate my point, whatever that is:

Quote:
Much ADO About Nothing
ADO.NET's NULL support answers developers' questions about...nothing

William Vaughn

One item on most developers' wish list is a tried-and-true way to determine the best ways to test for and set NULL values in their applications—regardless of the language the applications are written in. For example, when they need to signify that DateShipped or DateDied dates haven't been reached and aren't known, most relational database developers have to define these and similar data columns to permit NULL values. Note that a NULL value in a data column isn't the same as an empty or NULL string or any other placeholder that can serve to show that the value isn't known. The language you're using can treat an empty string or a placeholder value (such as Unknown) as a string or valid value and can store a NULL as a "known" value in the database. The concept of NULL has been a part of relational databases since their inception, and NULLs have always garnered special treatment. I won't get into a long-winded discussion about the wisdom of using NULLs, but I do think NULL is a better placeholder than BHOM (Beats the Hell Out of Me), which I used when I taught programming for the US Army.

In classic ADO, developers have to deal with NULL values because they can't assign a NULL to a numeric variable, a string, the Value property of a TextBox control, or any control that doesn't accept a variant data type (which you can set to NULL). If you forget to deal with NULL values and try to assign a NULL to a TextBox control, Visual Basic (VB) 6.0 issues an Invalid Use of NULL (94) error message. But ADO.NET and Visual Basic .NET have better support for NULL values. When you're working with the Common Language Runtime (CLR) and the .NET languages, ADO.NET lets you store, set, and test for NULL values in a variety of ways—far more than with classic ADO. This article uses Visual Basic .NET to showcase ADO.NET and Visual Basic .NET's NULL support.

In VB 6.0, if you expect that a field might contain a NULL value that will result in an Invalid Use of NULL error, you can short-circuit the problem by concatenating an empty string to the data Field.Value from the Recordset to the display TextBox.Text property as follows:


txtDateSold.Text =
rsMyData("DateSold") & ""This approach converts NULL values to an empty string, which the user doesn't see. If the TextBox is a bound control, this empty string (which represents a NULL value) is written to the database as an empty string unless you add code to convert the value back to a NULL—a must if the database column data type isn't a varchar or char. Concatenating an empty string also works in Visual Basic .NET, but the user still can't tell the difference between an empty TextBox and one that reflects a NULL value in the database—and you still have to add code to convert the empty string and post a NULL value to the database.

The easiest way to test for a NULL value in VB 6.0 is by testing for the Null keyword, as the following code shows:


If Not rs(0) = Null Then
Text1.Text = rs(0)
Else
Text1.Text = "<Unknown>"
End IfYou can also test for NULL values in VB 6.0 by using the IsNull() function, as the following code shows:


If IsNull(rs("DateShipped")) Then
txtDateShipped.Text =
"<Unknown>"
Else
txtDateShipped.Text =
rs("DateShipped")
End IfHowever, this approach takes a little longer to code and execute because it uses late binding. VB 6.0's IsNull() function corresponds to Visual Basic .NET's IsDBNull() function, which I show in a moment.

Setting NULL Values in VB 6.0
Setting an updateable Recordset Field object's Value property to NULL is painless: You can use either the DBNull or Null keywords, as the following three code examples show:


rs("Author") = DBNull
' The third (2) Field object
' is "Author".

rs(2).Value = Null

rs.Fields(enuFields.Author).Value = DBNullFor this method to work, the Field object must be updateable and support NULL values. All three of the above lines of code produce the same result.

Testing for NULL Values in Visual Basic .NET
Visual Basic .NET (and the .NET Framework languages in general) support many techniques for handling NULL values, as the following code examples show. First, open a connection and run a query to return several columns in a rowset; in this case, the first column is always NULL. To simplify the code, I use the dv variable to hold the returned column value:


Dim dv As Object
dv = drReader.GetValue(0)
' Capture the first value from
' the data stream.
txtDateShipped.Text = "" &
dv.ToStringYou can use any of the following techniques to test for NULL values in a specific item in the ADO.NET SqlDataReader object's Items collection, as I show later—to learn how to use the IsNULL() function to avoid NULLs, see the sidebar "Using T-SQL to Avoid Unwanted NULLs." Note that because I declare dv as an object, dv can contain a NULL value. If I don't declare dv as an object, ADO.NET will produce the exception message System
.InvalidCastException: Specified cast is not valid—but not until the query returns a NULL.

The first technique I use to test for NULL uses the Visual Basic .NET TypeOf function to examine the object data type:


If TypeOf dv Is DBNull Then
txtDateShipped.Text =
"<Unknown>"
Else
txtDateShipped.Text =
drReader(0).ToString
End IfThe next technique compares the data value in dv by using the expression Is DBNull.Value, which returns True if the object referenced is NULL:


If dv Is DBNull.Value Then
txtDateShipped.Text =
"<Unknown>"
Else
txtDateShipped.Text =
drReader(0).ToString
End IfYou can also use the IsDBNull expression to test for NULL against a specific SqlDataReader item; IsDBNull returns True if the column is set to NULL:


If IsDBNull(drReader(0)) Then
txtDateShipped.Text =
"<Unknown>"
Else
txtDateShipped.Text =
drReader(0).ToString
End IfAnd the final technique, which Listing 1 shows, uses the IsDBNull method of the specified SqlDataReader or Rows object, which returns True if the specified column contains a NULL.

Passing a NULL Value Back to the Server
In some cases, you might have to pass a NULL back to the server either as the contents of an updateable DataTable's DataRow or as a parameter in a query invocation. Visual Basic .NET and other languages make this operation easy—but different from what you might be used to. The code in Listing 2 executes the AcceptNullParms sample stored procedure. The stored procedure accepts two input parameters. The first parameter defaults to NULL, so if no parameter is passed, the default value of NULL is applied. The second parameter is required but can be set to NULL in your ADO.NET code (as Listing 2 shows) when you set up the Parameters collection.

The code to execute this stored procedure in Visual Basic .NET isn't complex. Notice that when I set up the Parameters collection, I don't specify a value for the first parameter, so ADO.NET passes default as the first parameter, as the SQL Server Profiler trace below shows. When I ran Profiler on the ADO.NET code that used the DataAdapter Fill method to execute the query, Profiler reported that the following query resulted:


exec AcceptNullParms @DateShipped
= default, @QtyOrdered = NULLI set the second Parameter.Value property to DBNull.Value to pass NULL as the data value, as the code in Listing 3 shows.

When you need to set a data column value to NULL in a DataRow (and the column permits you to set the value to NULL), simply set the object to DBNull.Value:


ds.Tables(0).Rows(0)("ISBN") =
DBNull.ValueAs more developers wade into ADO.NET, the number of questions about nothing—that is, about handling NULLs—is increasing proportionately. Fortunately, ADO.NET and the .NET languages provide far better support for nothing (er, NULL) than ADO and VB 6.0 do.
Here is where I show the link.

Here is where I seem pensive and thoughtful as I wonder, hmmmm, what do they actually MEAN by 'support' and 'approach' and venture so far as to say it's Obama's fault.
__________________
A word to the wise ain't necessary - it's the stupid ones who need the advice.
--Bill Cosby
Shawnee123 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 02:14 PM.


Powered by: vBulletin Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.