Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: file inout


Message #1 by msayers@c... on Wed, 28 Nov 2001 06:39:11
Hi folks,



  I need some advice and be pointed in the right direction.

I need to upload and read a cvs text file.

Can someone show me or point me into the right direction on how to do 

this ?? I could have several files from several different users uploading 

at once. The filename from each is no problem, but how to read and import 

into the database is another issue that I am unsure of how to do.

thanks ;-)
Message #2 by "Jason Salas" <jason@k...> on Wed, 28 Nov 2001 16:36:54 +1000
Well, the reading of the file isn't too hard, you could use the VBScript

FileSystemObject object to open and read through a file already written to

disk.



A good description of using this object is at:

http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html





However, uploading the file from a hard disk can be tricky...you'll either

have to write a very complex script, or purchase a third-party component,

like ASPUpload: http://www.aspupload.com/



HTH,

Jason



----- Original Message -----

From: <msayers@c...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Wednesday, November 28, 2001 6:39 AM

Subject: [asp_web_howto] file inout





> Hi folks,

>

>   I need some advice and be pointed in the right direction.

> I need to upload and read a cvs text file.

> Can someone show me or point me into the right direction on how to do

> this ?? I could have several files from several different users uploading

> at once. The filename from each is no problem, but how to read and import

> into the database is another issue that I am unsure of how to do.

> thanks ;-)




$subst('Email.Unsub')

>

> Read the future with ebooks at B&N

>

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks

>



Message #3 by "MARTHA J SAYERS" <msayers@c...> on Wed, 28 Nov 2001 06:06:00 -0800
I will be using a third party component for uploading.

Perhaps I wasn't very clear in my original post.

If I use FileSystem object, it's either readline (reads entireline) or read

the whole file as a string.

THE problem is each line of the file will contain several fields, I want to

know how I can read each field from a line,  much like you would if using

vb6 or C etc.

thanks for the response...:-)





Message #4 by "Jason Salas" <jason@k...> on Wed, 28 Nov 2001 21:28:56 +1000
Maybe the best way to do this would be to use XML.  You could define the

layout you would want from your CSV file and then export everything into a

custom XML formatted document.  Perhaps the simplest way to do this would be

to use the VBScript Stream object, and read the contents, delimited by

comma, into a stream.  Then you can export this as XML.



HTH,

Jason





----- Original Message -----

From: "MARTHA J SAYERS" <msayers@c...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Thursday, November 29, 2001 12:06 AM

Subject: [asp_web_howto] Re: file inout





> I will be using a third party component for uploading.

> Perhaps I wasn't very clear in my original post.

> If I use FileSystem object, it's either readline (reads entireline) or

read

> the whole file as a string.

> THE problem is each line of the file will contain several fields, I want

to

> know how I can read each field from a line,  much like you would if using

> vb6 or C etc.

> thanks for the response...:-)

>

>

>




$subst('Email.Unsub')

>

> Read the future with ebooks at B&N

>

http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid

=rn_ebooks

>



Message #5 by "MARTHA J SAYERS" <msayers@c...> on Wed, 28 Nov 2001 08:04:52 -0800
Can you use Xml and ASP together ??

I am reading on XML and the webserver uses asp developed thru InterDev but

not using it sticky record controls uses ado etc.

Do I have to do something different to the Web Server ??

Will it cause problems with my asp pages ??

any reading suggestons ??

thanks so much for responsding :-)

marthaj






  Return to Index