I am trying to import a .csv text file into access using an import
specification and everytime I try to import the data I get a type
conversion failure because there is no percentage data type that will
recognize the values that are in the .csv file.
Does anyone know how I can accomplish this import? I am really
wanting to automate this import process somehow using VBA and need to
first get this data in the table.
Any help would be greatly appreciated!!!
Thanks in advance,
Greg
|
|
0
|
|
|
|
Reply
|
gregperry
|
3/13/2010 12:35:01 AM |
|
The data field that I am trying to import that is causing the problems has
percent data in it.
gregperry wrote:
>I am trying to import a .csv text file into access using an import
>
>specification and everytime I try to import the data I get a type
>
>conversion failure because there is no percentage data type that will
>
>recognize the values that are in the .csv file.
>
>Does anyone know how I can accomplish this import? I am really
>
>wanting to automate this import process somehow using VBA and need to
>
>first get this data in the table.
>
>Any help would be greatly appreciated!!!
>
>Thanks in advance,
>
>Greg
|
|
0
|
|
|
|
Reply
|
gregperry
|
3/13/2010 12:38:02 AM
|
|
I import .csv text files into my application. There's nothing special I do
about any of the data elements. After reading each input record, I simply
parse it into a Variant array. I then deal with each element, one at a
time.
It would seem that if a specific element (Variant by that time) is a
percentage, you would deal with it accordingly. The fact that it came from
a .csv text file is no longer a material matter.
bob
"gregperry" <u58729@uwe> wrote in message news:a4ebfa1fabd68@uwe...
> The data field that I am trying to import that is causing the problems has
> percent data in it.
>
> gregperry wrote:
>>I am trying to import a .csv text file into access using an import
>>
>>specification and everytime I try to import the data I get a type
>>
>>conversion failure because there is no percentage data type that will
>>
>>recognize the values that are in the .csv file.
>>
>>Does anyone know how I can accomplish this import? I am really
>>
>>wanting to automate this import process somehow using VBA and need to
>>
>>first get this data in the table.
>>
>>Any help would be greatly appreciated!!!
>>
>>Thanks in advance,
>>
>>Greg
>
|
|
0
|
|
|
|
Reply
|
Bob
|
3/14/2010 1:31:55 PM
|
|
i can help you
"gregperry" <u58729@uwe> wrote in message news:a4ebf397e3794@uwe...
>I am trying to import a .csv text file into access using an import
>
> specification and everytime I try to import the data I get a type
>
> conversion failure because there is no percentage data type that will
>
> recognize the values that are in the .csv file.
>
> Does anyone know how I can accomplish this import? I am really
>
> wanting to automate this import process somehow using VBA and need to
>
> first get this data in the table.
>
>
> Any help would be greatly appreciated!!!
>
> Thanks in advance,
>
> Greg
>
|
|
0
|
|
|
|
Reply
|
skarlet
|
3/24/2010 12:36:14 AM
|
|
"gregperry" <u58729@uwe> ha scritto nel messaggio news:a4ebf397e3794@uwe...
> I am trying to import a .csv text file into access using an import
>
> specification and everytime I try to import the data I get a type
>
> conversion failure because there is no percentage data type that will
>
> recognize the values that are in the .csv file.
>
> Does anyone know how I can accomplish this import? I am really
>
> wanting to automate this import process somehow using VBA and need to
>
> first get this data in the table.
>
>
> Any help would be greatly appreciated!!!
>
> Thanks in advance,
>
> Greg
>
|
|
0
|
|
|
|
Reply
|
celeste
|
3/25/2010 9:16:30 AM
|
|
My question is how can I deal with it accordingly when there is no percentage
data type for an access import spec? It automatically converst the
percentage to a string.
Bob Howard wrote:
>I import .csv text files into my application. There's nothing special I do
>about any of the data elements. After reading each input record, I simply
>parse it into a Variant array. I then deal with each element, one at a
>time.
>
>It would seem that if a specific element (Variant by that time) is a
>percentage, you would deal with it accordingly. The fact that it came from
>a .csv text file is no longer a material matter.
>
>bob
>
>> The data field that I am trying to import that is causing the problems has
>> percent data in it.
>[quoted text clipped - 18 lines]
>>>
>>>Greg
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-conversion/201003/1
|
|
0
|
|
|
|
Reply
|
gregperry
|
3/25/2010 10:14:06 PM
|
|
Thank you for your reply. I am still at a loss with this particular issue.
I ended up just importing the value as a string and using the left & right
string functions to pull the percentage sign off and recalculate the string
as a percentage. Which works fine I guess, I was just wondering if there
wasn't a more effective way to handle this.
skarlet wrote:
>i can help you
>>I am trying to import a .csv text file into access using an import
>>
>[quoted text clipped - 15 lines]
>>
>> Greg
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-conversion/201003/1
|
|
0
|
|
|
|
Reply
|
gregperry
|
3/25/2010 10:16:46 PM
|
|
In my opinion, you should first remove all '%' signes in your .csv file by
opening the file and reading line by line using something like
'replace(line1,'%','')' which will replace all % sign by an empty string.
Then check if the decimal sign is correct according to your settings (some
may need a '.' other a ',').
Percentages are just number with some decimals, so you should consider them
as numbers.
Good luck
Vincent
"gregperry" <u58729@uwe> schreef in bericht news:a4ebf397e3794@uwe...
> I am trying to import a .csv text file into access using an import
>
> specification and everytime I try to import the data I get a type
>
> conversion failure because there is no percentage data type that will
>
> recognize the values that are in the .csv file.
>
> Does anyone know how I can accomplish this import? I am really
>
> wanting to automate this import process somehow using VBA and need to
>
> first get this data in the table.
>
>
> Any help would be greatly appreciated!!!
>
> Thanks in advance,
>
> Greg
>
|
|
0
|
|
|
|
Reply
|
vincent
|
3/28/2010 5:06:14 PM
|
|
Make sure no '%' sign is present in your csv file. If there are, use code to
open the file line by line and replace all % sign with '' (=null string)
using Replace(linx,'%','') or open the file manually and use the function
'Replace' to do the same.
Also make sure that the decimal sign is correct in your csv file: try with a
comma ',' or a dot '.' but it must be recognized as a decimal sign when
importing.
Percentages are just numbers with 2 (or more) decimals. After importing in
Access you can format the display with 2 or more decimals.
Good luck.
Vincent
"Bob Howard" <info@churchtrax.com> schreef in bericht
news:um171p3wKHA.4492@TK2MSFTNGP05.phx.gbl...
> I import .csv text files into my application. There's nothing special I
> do about any of the data elements. After reading each input record, I
> simply parse it into a Variant array. I then deal with each element, one
> at a time.
>
> It would seem that if a specific element (Variant by that time) is a
> percentage, you would deal with it accordingly. The fact that it came
> from a .csv text file is no longer a material matter.
>
> bob
>
> "gregperry" <u58729@uwe> wrote in message news:a4ebfa1fabd68@uwe...
>> The data field that I am trying to import that is causing the problems
>> has
>> percent data in it.
>>
>> gregperry wrote:
>>>I am trying to import a .csv text file into access using an import
>>>
>>>specification and everytime I try to import the data I get a type
>>>
>>>conversion failure because there is no percentage data type that will
>>>
>>>recognize the values that are in the .csv file.
>>>
>>>Does anyone know how I can accomplish this import? I am really
>>>
>>>wanting to automate this import process somehow using VBA and need to
>>>
>>>first get this data in the table.
>>>
>>>Any help would be greatly appreciated!!!
>>>
>>>Thanks in advance,
>>>
>>>Greg
>>
>
>
|
|
0
|
|
|
|
Reply
|
vincent
|
3/29/2010 4:52:14 PM
|
|
|
8 Replies
755 Views
(page loaded in 0.425 seconds)
Similiar Articles: Type Conversion Failure!!!! - microsoft.public.access.conversion ...I am trying to import a .csv text file into access using an import specification and everytime I try to import the data I get a type conversion failure because ... Importing Into Access - Type Conversion Failure Message ...import data from access table into a existing table - microsoft ... Importing Into Access - Type Conversion Failure Message ... Importing Into Access - Type ... Update type conversion error with nulls - microsoft.public.access ...ACC2: "Type Conversion Failure" with Update or Append Query Moderate: Requires basic macro, coding, and interoperability skills. When you run an append or update query ... muitple Message Recall Failure message - microsoft.public.outlook ...Importing Into Access - Type Conversion Failure Message ... muitple Message Recall Failure message - microsoft.public.outlook ... Data Import w/ Multiple types of ... Concatenate Text Fields to Date Field - microsoft.public.access ...The three fileds for month, day, > > year, are text. The concatination works in that the string is together but I > > want to correct the "type conversion failure ... Add dashes to field.... - microsoft.public.accessAdd dashes to field.... - microsoft.public.access Add dashes to field.... - microsoft.public.access >5626 fields(s) due to a type conversion failure. > >Does anyone know ... Chart conversion - microsoft.public.powerpointPulling specific data from table field - microsoft.public.access ... >>due to a type conversion failure. It states this is due to key violations, lock violations, and ... Data type issue when importing from excel to access - microsoft ...Importing Into Access - Type Conversion Failure Message ... Importing an Excel spreadsheet into Access ... this problem is to create a table in Access > that > > > has the ... Pulling specific data from table field - microsoft.public.access ...> > When running the First Name query, an error is returned saying Access > was unable to update a number of fields due to a type conversion failure. import data from access table into a existing table - microsoft ...Importing Into Access - Type Conversion Failure Message ... Jon I'm not sure how Access can decide there are at least 57 fields ... have you looked in the table ... Type Conversion Failure Occurs When Importing Microsoft Excel DataWhen you import a Microsoft Excel spreadsheet to a new table or to an existing table in a Microsoft Access database, you may receive the following error ... ACC2: "Type Conversion Failure" with Update or Append QueryModerate: Requires basic macro, coding, and interoperability skills. When you run an append or update query, you receive a "type conversion failure" error message ... Type Conversion Failure Error Message On Import | MS Access[Archive] Type Conversion Failure Error Message on Import General Getting "Type Conversion Failure" Message | MS Access[Archive] Getting Type Conversion Failure message General ... I've got a CSV file that was created using SAS software. The CSV file has column titles in the first row. 7/26/2012 3:40:13 PM
|