Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2004

Tip: Looking for answers? Try searching our database.

insert null to mssql when it passed a integer = 0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joe - 22 Jul 2004 05:57 GMT
Dear all
the integer in vb.net can not be null, it always be 0 when it have nothing
however i want to insert null to db when it is 0. how can do it

moreover
how to check a textbox is value? e.g   txtbox = 2828828
is it txtbox.text.isinteger?
Claes Bergefall - 22 Jul 2004 09:40 GMT
> moreover
> how to check a textbox is value? e.g   txtbox = 2828828
> is it txtbox.text.isinteger?

Try
   Dim value As Integer = Int32.Parse(txtbox.Text)
Catch
   ' It wasn't an integer
End Try

   /claes
Joe - 22 Jul 2004 11:43 GMT
any shared function provided by .net
i don't want to use error handling things

> > moreover
> > how to check a textbox is value? e.g   txtbox = 2828828
[quoted text clipped - 7 lines]
>
>     /claes
Claes Bergefall - 23 Jul 2004 08:19 GMT
> any shared function provided by .net

Int32.Parse *is* a shared function provided by .NET
But, as Mark wrote, you can always use IsNumeric instead

> i don't want to use error handling things
So basically nothing can ever go wrong in your program?
Cool :-)

   /claes

> > > moreover
> > > how to check a textbox is value? e.g   txtbox = 2828828
[quoted text clipped - 7 lines]
> >
> >     /claes

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.