[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

xianxian chan

5/6/2005 7:18:00 AM

Hi everyone,

what is the syntax for NULL if u guys know of any..


Cache.Add("ProductsTable", s, null, DateTime.Now.AddSeconds(60),
TimeSpan.Zero, CacheItemPriority.High, null)


i tried writing the code as u can see above, but when i put my mouse
pointer over the blue curly underline on the word "null", it says:-

" 'null' is not declared. 'Null' constant is no longer supported; use
'System.DBNull' instead. "

Then, when i replace the word "null" with 'System.DBNull',
it says:-

" 'DBNull' is a type in 'System' and cannot be used as an expression. "

So what am i supposed to use for a NULL object?

Thanks guys =)

*** Sent via Developersdex http://www.develop... ***
3 Answers

Scott M.

5/6/2005 1:55:00 PM

0

In VB.NET it is: Nothing


Cache.Add("ProductsTable", s, Nothing, DateTime.Now.AddSeconds(60),
TimeSpan.Zero, CacheItemPriority.High, Nothing)

"xianxian chan" <rschane03-vbforum@yahoo.com.sg> wrote in message
news:usEEEvgUFHA.1200@TK2MSFTNGP10.phx.gbl...
> Hi everyone,
>
> what is the syntax for NULL if u guys know of any..
>
>
> Cache.Add("ProductsTable", s, null, DateTime.Now.AddSeconds(60),
> TimeSpan.Zero, CacheItemPriority.High, null)
>
>
> i tried writing the code as u can see above, but when i put my mouse
> pointer over the blue curly underline on the word "null", it says:-
>
> " ''null'' is not declared. ''Null'' constant is no longer supported; use
> ''System.DBNull'' instead. "
>
> Then, when i replace the word "null" with ''System.DBNull'',
> it says:-
>
> " ''DBNull'' is a type in ''System'' and cannot be used as an expression. "
>
> So what am i supposed to use for a NULL object?
>
> Thanks guys =)
>
> *** Sent via Developersdex http://www.develop... ***


xianxian chan

5/9/2005 2:19:00 AM

0

hi scott

thank you very much =)

hope u''ll have a nice dae =)

regards,
xianxian

*** Sent via Developersdex http://www.develop... ***

Scott M.

5/9/2005 8:59:00 PM

0

u2


"xianxian chan" <rschane03-vbforum@yahoo.com.sg> wrote in message
news:uaXVB2DVFHA.3620@TK2MSFTNGP09.phx.gbl...
> hi scott
>
> thank you very much =)
>
> hope u''ll have a nice dae =)
>
> regards,
> xianxian
>
> *** Sent via Developersdex http://www.develop... ***