Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Testing SqlParameter


Message #1 by "J Donahue" <jdonahue@f...> on Thu, 19 Sep 2002 18:57:29
How would I test the sqlparameter in the following to see if it's nothing?

Sub myFunc(ByRef param As SqlParameter)

   If IsNothing(param)= True Then
      Return True
   Else
      Return False
   End IF
EndSub

I've tried various methods to test if "param" is anything but I keep 
getting an error saying "input string not in correct format" on the 
IsNothing(param).  
Thanks...
Message #2 by "Alvin Ling" <alvin.ling@i...> on Thu, 19 Sep 2002 15:19:44 -0400
Use Convert.IsDBNull()

Alvin

> -----Original Message-----
> From: J Donahue [mailto:jdonahue@f...] 
> Sent: Thursday, September 19, 2002 6:57 PM
> To: ASP+
> Subject: [aspx] Testing SqlParameter
> 
> 
> How would I test the sqlparameter in the following to see if 
> it's nothing?
> 
> Sub myFunc(ByRef param As SqlParameter)
> 
>    If IsNothing(param)= True Then
>       Return True
>    Else
>       Return False
>    End IF
> EndSub
> 
> I've tried various methods to test if "param" is anything but I keep 
> getting an error saying "input string not in correct format" on the 
> IsNothing(param).  
> Thanks...
> ---
> 
> ASP.NET 1.0 Namespace Reference with C# 
> http://www.wrox.com/acon11.asp?ISBN=1861007442
> 
> ASP.NET 1.0 
> Namespace Reference with VB.NET 
> http://www.wrox.com/acon11.asp?ISBN=1861007450
> 
> These books 
> are a complete reference to the ASP.NET namespaces 
> for developers who are already familiar with using ASP.NET. 
> There is no trivial introductory material or useless .NET 
> hype and the presentation of the namespaces, in an easy-to use 
> alphabetical order ensures a user-friendly reference format.
> We provide in-depth coverage of all the major ASP.NET classes, 
> giving you those real-world tips that the documentation doesn't 
> offer, and demonstrating complex techniques with simple 
> examples.  
> 
> ---
> 
> 
> 


Message #3 by "J Donahue" <jdonahue@f...> on Fri, 20 Sep 2002 20:24:47
Thanks Alvin!!!!!!!!!!!!

> Use Convert.IsDBNull()

Alvin



  Return to Index