Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Reading n th postion from a text file

Author  Topic 

shajimanjeri
Posting Yak Master

179 Posts

Posted - 2010-01-12 : 06:44:56
Dears,

I have a text file which is storing mobile numbers like this format

9191XXXXXXX1
9191XXXXXXX2
9191XXXXXXX3
9191XXXXXXX4
9191XXXXXXX6
9191XXXXXXX7
9191XXXXXXX8
...
...
etc

Here I want to read first & second mobile number and store in a variable with comma separator, then third & fourth and store in another variable with comma separator, then fifth & sixth and store in another variable with comma separator and so on...

var a = 9191XXXXXXX1,9191XXXXXXX2
var b = 9191XXXXXXX3,9191XXXXXXX4
var c = 9191XXXXXXX5,9191XXXXXXX6 and so on...

How to do this in ASP coding. Here my text file contain n mobile numbers. So I need a generalized way please

Regards
Shaji




visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-01-12 : 06:48:35
can i ask the need of storing this in different variables?
Go to Top of Page

shajimanjeri
Posting Yak Master

179 Posts

Posted - 2010-01-12 : 06:54:25
After storing these in a different variables then I have to process http request which will allow me only two mobile numbers at a time to send. but i have number of mobiles in my text file. So I want to read two mobile numbers at a time and send it through http and so on...


Go to Top of Page

shajimanjeri
Posting Yak Master

179 Posts

Posted - 2010-01-12 : 08:21:06
Hi Visakh16,
Is it I am in wrong way to do this task. Is there any other way. I can store all the mobiles in an array. Is it possible to to read first two array and so on...




quote:
Originally posted by visakh16

can i ask the need of storing this in different variables?

Go to Top of Page
   

- Advertisement -