473,773 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you determine TYPE of incoming data

I am reading in an Excel CSV file and I need to determine the data Type of
the fields being read in. There are numbers text, money, and dates. Is there
a function or technique that will give this info.

thanks for any help
Jun 15 '07 #1
3 1815
How can I install VB6 in Windows Vista??? I'm new to programming and it
takes me lots of time! Please help!

Jun 15 '07 #2
Mike,

The short answer is no because a csv file doesn't have a schema. There is
no way for the .NET framework to know whether the value "20517" is meant to
be a date representation, a string ("20517"), a number (20,517.00), currency
(though there is no 'currency' type), etc.

If you could describe a little more of your scenario, I'll see if I can help
find a solution. Usually when importing flat files, it is necessary to
understand what data it will contain, a schema so to speak.

Hope this helps,
Steve

"Mike" <mi*******@hotm ail.comwrote in message
news:ac******** *************** *******@pghconn ect.com...
>I am reading in an Excel CSV file and I need to determine the data Type of
the fields being read in. There are numbers text, money, and dates. Is
there a function or technique that will give this info.

thanks for any help

Jun 15 '07 #3
thanks for the response Steve.

"PlatinumBa y" <st*******@comm unity.nospamwro te in message
news:eG******** ******@TK2MSFTN GP06.phx.gbl...
Mike,

The short answer is no because a csv file doesn't have a schema. There is
no way for the .NET framework to know whether the value "20517" is meant
to be a date representation, a string ("20517"), a number (20,517.00),
currency (though there is no 'currency' type), etc.

If you could describe a little more of your scenario, I'll see if I can
help find a solution. Usually when importing flat files, it is necessary
to understand what data it will contain, a schema so to speak.

Hope this helps,
Steve

"Mike" <mi*******@hotm ail.comwrote in message
news:ac******** *************** *******@pghconn ect.com...
>>I am reading in an Excel CSV file and I need to determine the data Type of
the fields being read in. There are numbers text, money, and dates. Is
there a function or technique that will give this info.

thanks for any help


Jun 15 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4895
by: Mike Verdone | last post by:
Hello all, I'm trying to implement a PHP program that can handle streaming HTTP data through Apache. I need to somehow get access to the incoming data of the HTTP request as it arrives (i.e. I don't want to access the FILE array). Is this possible with mod_php? I think that, in general, it should be possible as I think mod_python can do it.
17
6150
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...
3
17990
by: david.kao | last post by:
I am trying to use Type.GetType(name of type in string format) to get an instance Type. For example: Type t = Type.GetType("System.Data.DataTable"). I have no trouble to get a value type For example: Type t = Type.GetType("System.String").
3
7489
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
14
1782
by: Niels | last post by:
Hi, I have a Acces Db with one Table. The Table has 4 rows (row 1 & 3 are integer and 2 & 4 are text). Now i want to export the Table to an Excel workbook. the next code i used is working (almost) fine. ///Code 'Create a Recordset from all the records in the Orders table. Dim sNWind As String
2
1803
by: cody | last post by:
Hi! we are building an xml-export tool to export our business entities from out app. we use reflection to determine the data type of properties. e.g. we have a class Customer with a CustNo property, and reflection tells us that the type is int. so far so good. Now we have a ContactCollection (which inherits from MyBaseColletion) inside the Customer class.
5
2635
by: Jens | last post by:
Hello, I have been looking for some C-code which listens on a user-defined port for incoming data traffic. When data is received, the data is written to a file. I found some C-code (server) that almost does the job. It listens on a user-defined port and responds to incoming data by writing how many times somebody has tried to connect to the server.
2
642
by: Dsperry101 via AccessMonster.com | last post by:
Hello, I have been working with visual basic for a while but this is something I have never understood. I have some code in a VB6 application that sends email using Winsock and works great. I am trying to incorporate the code in Access 2000 . I inserted the activex control "Microsoft Winsock control (SP6) and it shows up on the form. When I ran the form I get "object variable with block not set" on the line "Winsock1.LocalPort = 0", I...
3
13257
by: Giampaolo Rodola' | last post by:
Hi, I'd like to know if there's a way to determine which is the best buffer size to use when you have to send() and recv() some data over the network. I have an FTP server application which, on data channel, uses 8192 bytes as buffer for both incoming and outgoing data. Some time ago I received a report from a guy who stated that changing the buffers from 8192 to 4096 results in a drastical speed improvement. I tried to make some tests...
0
10106
jinu1996
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...
1
10039
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,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
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...
0
6717
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();...
0
5355
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...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.