Hello All,
This may be a trivial question, but I was wondering how can you determine if
a value contains an Integer or Float. I know there is a function called
IsNumeric, however you can't determine what type it is.
Thanks for the help,
Shahid 3 2580
Shahid Juma wrote: Hello All,
This may be a trivial question, but I was wondering how can you determine if a value contains an Integer or Float. I know there is a function called IsNumeric, however you can't determine what type it is.
Thanks for the help, Shahid
If Int(val) = val then
'It's an integer
Else
'It's a float
End if
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Thanks,
A follow up to this question. How can you determine what type of variable it
is from the record set. If you have a query that looks at a table in SQL
Server. How can you tell that a certain field is varchar, bigint, int, etc?
The reason for asking is that I need to know what type of variable it is and
sometimes these fields are empty so using the value to determine what type
won't work every time.
Thanks,
Shahid
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. Shahid Juma wrote: Hello All,
This may be a trivial question, but I was wondering how can you determine if a value contains an Integer or Float. I know there is a function called IsNumeric, however you can't determine what type it is.
Thanks for the help, Shahid
If Int(val) = val then 'It's an integer Else 'It's a float End if
Bob Barrows -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
http://msdn.microsoft.com/library/de.../mdprotype.asp
--
Mark Schupp
Head of Development
Integrity eLearning www.ielearning.com
"Shahid Juma" <sh************ *****@hotmail.c om> wrote in message
news:un******** ******@TK2MSFTN GP10.phx.gbl... Thanks,
A follow up to this question. How can you determine what type of variable
it is from the record set. If you have a query that looks at a table in SQL Server. How can you tell that a certain field is varchar, bigint, int,
etc? The reason for asking is that I need to know what type of variable it is
and sometimes these fields are empty so using the value to determine what type won't work every time.
Thanks, Shahid
"Bob Barrows [MVP]" <re******@NOyah oo.SPAMcom> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. Shahid Juma wrote: Hello All,
This may be a trivial question, but I was wondering how can you determine if a value contains an Integer or Float. I know there is a function called IsNumeric, however you can't determine what type it is.
Thanks for the help, Shahid
If Int(val) = val then 'It's an integer Else 'It's a float End if
Bob Barrows -- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: John Bentley |
last post by:
John Bentley:
INTRO
The phrase "decimal number" within a programming context is ambiguous. It could
refer to the decimal datatype or the related but separate concept of a generic
decimal number. "Decimal Number" sometimes serves to distinguish Base 10
numbers, eg "15", from Base 2 numbers, Eg "1111". At other times "Decimal
Number" serves to differentiate a number from an integer. For the rest of this
post I shall only use either...
|
by: bart plessers |
last post by:
Hello,
I have a form with some checkboxes, i.e.
The default value of this checkbox is determined in a global file
(config.asp), that is included in first line of the form, i.e.
ShowFilenames = 1
The first time the form is displayed, the value of ShowFilenames should be
|
by: Christopher W. Douglas |
last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a
method that handles several events, such as closing a form and changing the
visible status of a form. I have some code that applies to all these
events, but I need to have specific code execute when the form closes. The
properties for this method are sender (the originator) and e (event
arguments). I know how to get typeof (sender) to determine what form or...
|
by: JK |
last post by:
This is an easy one, but I'm a JS newbie. I want to write a function that
determines input value. If 0 - 100 than will use input as % (i.e., 3 would
become .03 and used for calculations); otherwise, as dollar value (i.e.,
1,000 would become $1,000 and used for calculations). In other words, I want
input.value 3 to either be input.value 1 * input.value 2, or simply =
input.value 1. Please be specific about placement of function (header or...
|
by: Bob Day |
last post by:
VS 2003, sql
How do you determine the data type of a column if its value is DBNull?
1)Table:
Column1 STRING non-nullable
2) Fill to a DataSet via DataAdapter
3) dim Data_Type_Is as object
| |
by: Jm |
last post by:
Hi All
Is it possible to determine who is logged onto a machine from inside a
service using code in vb.net ? I have found some code that seems to work
under vb6, but doesnt under .NET ? Any help is greatly appreciated
Thanks
|
by: Joseph Turian |
last post by:
How can I determine the type of some particular typename?
I am writing a template, and it needs special case handling for some
particular types:
template <typename T>
class foo {
public:
foo() {
if (T == int) cerr << "int\n";
|
by: tshad |
last post by:
I have some code to go through a session collection for my error page
routine and I get an error on my objects that I store in session variables.
Dim strName as String
Dim iLoop as Integer
For Each strName in Session.Contents
trace.warn(strName & " - " & Session.Contents(strName))
Next
|
by: mantrid |
last post by:
Hello
Im trying to find the correct syntax to use to determine whether which form
element is visible on changing the value in a dropdown list
I need something in the onChange of the dropdown list that will cause the
appropriate element on another part of the page to be displayed
pseudo code below
var mydropdownlist =
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |