473,473 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I keep a comma from delimiting during import...

Thnaks in advance for considering this post. It's probably very simple,
but.....

I have an old VB6 application that allows me to create, save and edit a
"project information file" that is a simple .txt file. I then use that file
to keep the project information current for the multiple AutoCAD drawings
that project requires.

My problem.....several of the items I save are company names (customers).
Many times company names have commas in them. When my VB application imports
a file with a comma in the company name, the comma is interpreted by VB as a
delimiter (spelling) and it splits the name and shifts the balance of the
rest of the information into the next field.

How can I eliminate this from happening??

Thanks again!!
Nov 11 '05 #1
3 1827
Unless you can change the old application I don't think you can logically
distinguish company names with comma's from company names without commas. If
it is possible to change the application that creates the files you could
replace commas in company names by a different character and in the other
application replace the differenct character again with a company

One other trick would be to count the comma's in a row if it is fixed and if
the company name is the only field that can contain a comma and the number
of comma's in a row exceeds the expected number of comma's you know that
there is a comma in the company name. You can then in your application
before the split replace the comma by another character and set the
character back.

There might be several solutions for your problem but we don't know the
specifics.

Gabriel Lozano-Morán
Nov 11 '05 #2
My file is not comma delimited. Each piece of data is a new line. So, I
could scan thru each line to find commas and address them as I find them,
correct?

Also, after a little more research, I believe that qoutation marks around
each company name could be a solution, too. Is there a setting for VB to
include quotation marks around data when writing it to a file, or would I
need to hard-code it? I'd have to modify my code in AutoCAD to remove the
quotation marks, though...

Thanks!
Nov 11 '05 #3
> My file is not comma delimited. Each piece of data is a new line.

In that case where does the splitting exactly happen? Cause I was assuming
that you were trying to import a comma-seperated list.

Gabriel
Nov 11 '05 #4

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

Similar topics

27
by: Alberto Vera | last post by:
Hello: I have the next structure: How Can I make it using Python? How Can I update the value of 6?
2
by: jamesthiele.usenet | last post by:
I recently ran into the issue with 'print' were, as it says on the web page called "Python Gotchas" (http://www.ferg.org/projects/python_gotchas.html): The Python Language Reference Manual says,...
3
by: Elmo Watson | last post by:
I've been asked to develop a semi-automated type situation where we have a database table (sql server) and periodically, there will be a comma delimited file from which we need to import the data,...
1
by: DCM Fan | last post by:
Access 2K, SP3 on Windows 2K, SP4 All, I have an import spec set up with quoted Identifiers and comma-separated values. The text file is produced by a 3rd-party program of which I have no...
1
by: don | last post by:
I'm trying to import a comma delimited text file into MS Access 2002 version - the first column is set for an auto increment primary key and everything works right the first time I import a text...
4
by: SteelDetailer | last post by:
Thnaks in advance for considering this post. It's probably very simple, but..... I have an old VB6 application that allows me to create, save and edit a "project information file" that is a...
15
by: Lighter | last post by:
In 5.3.3.4 of the standard, the standard provides that "The lvalue-to- rvalue(4.1), array-to-pointer(4.2),and function-to-pointer(4.3) standard conversions are not applied to the operand of...
2
by: KiP.Kolodziejczyk | last post by:
I 'd like to insert (via "bulk insert") between 10-20 files (about 300MB each) into one table. The problem is that in input files decimal point is written as "," and without leading zeros (i.e.:...
2
by: bizt | last post by:
Hi, I am performing an XSLT on a XML feed. The XSLT produces me with PHP code that I eval then insert into my DB. However, the way that the system Im assigned to is setup, I need to convert all...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
1
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...
0
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...
0
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,...
1
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...
0
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...
0
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 ...
0
muto222
php
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.