Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 14th, 2006, 5:07 AM   #11
KTiger
Newbie
 
KTiger's Avatar
 
Join Date: May 2006
Location: Narvik, Norway
Posts: 22
Rep Power: 0 KTiger is on a distinguished road
May I ask what the numbers in parameter 2 is, and does it require to have 11 numbers?
Albert ferrer,00000000003,albert@tm.com.my

I would recommend for parameters that are string to use "-char (or another split-char), like this:
"Albert ferrer",3,"albert@tm.com.my"
__________________
To sell your own books it's like selling a piece of your soul. Kim
KTiger is offline   Reply With Quote
Old Jun 14th, 2006, 6:00 AM   #12
pastalover
Newbie
 
Join Date: May 2006
Posts: 11
Rep Power: 0 pastalover is on a distinguished road
yes,it have 11 numbers
pastalover is offline   Reply With Quote
Old Jun 14th, 2006, 6:01 AM   #13
pastalover
Newbie
 
Join Date: May 2006
Posts: 11
Rep Power: 0 pastalover is on a distinguished road
yes,it have 11 numbers.how to do that?
pastalover is offline   Reply With Quote
Old Jun 14th, 2006, 6:03 AM   #14
pastalover
Newbie
 
Join Date: May 2006
Posts: 11
Rep Power: 0 pastalover is on a distinguished road
DaWei,
the problem is after all i need to load all the data into server..the server can only read the data (.txt file) which is in arrange position
pastalover is offline   Reply With Quote
Old Jun 14th, 2006, 6:47 AM   #15
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I would question the accuracy of that statement, but you may be correct. The server may be poorly designed or written. It's unlikely that it needs to perform multitudinous seeks here and there for a file such as you show.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Jun 14th, 2006, 11:18 AM   #16
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
if you access to awk
awk -F"," '{printf ("%-30s|%s|%s\n",$1,$2,$3) }' filename > newfilename
jim mcnamara is offline   Reply With Quote
Old Jun 14th, 2006, 11:17 PM   #17
nindoja
Programmer
 
Join Date: Jun 2005
Posts: 92
Rep Power: 4 nindoja is on a distinguished road
Quote:
Originally Posted by pastalover
DaWei,
the problem is after all i need to load all the data into server..the server can only read the data (.txt file) which is in arrange position
I think you misunderstand how the server is reading data in. If you were to print a tab character between each parameter, the data base should read it in fine. Databases tend to read in tab-delimeted files, which is how they determine where the data is split.
nindoja is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:50 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC