borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How change vb6 code to Asp.Net code)Next Topic (Inserting a banner...) New Topic New Poll Post Reply
AndreaVB Forum : ASP.Net : ASP.NET Import/Export
Poster Message
CLIPER
Level: Big Cheese

Registered: 26-07-2005
Posts: 27

icon ASP.NET Import/Export

Hi, I would like to have a asp.net application that will let me extract or import data automatically to my Access Database. For that, I have a .csv file and I will then upload it and will be extracted into one of the table in my Access Database. Is there any feauture that ASP.NET can easily do? Is "IO" related to this? Could anyone poiunt out any feautures that will help me do this?

____________________________
CLIPER

23-02-2006 at 07:06 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
~Bean~
Level: VB Guru


Registered: 07-04-2003
Posts: 488
icon Re: ASP.NET Import/Export

Yes, System.IO namespace is used for this. Use a StreamReader for file access...

Something like:


Dim file As New System.IO.StreamReader("c:\test.txt")
Dim oneLine As String
oneLine = file.ReadLine()
While (oneLine <> "")
   Dim myArray() As String = Split(oneLine, ",")
   'Now do somethign mith your array (i.e., save to DB)
   ...
   oneLine = file.ReadLine()
End While
file.Close()


____________________________
Eggheads unite! You have nothing to lose but your yolks.

24-02-2006 at 08:13 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
CLIPER
Level: Big Cheese

Registered: 26-07-2005
Posts: 27
icon Re: ASP.NET Import/Export

quote:
~Bean~ wrote:
Yes, System.IO namespace is used for this. Use a StreamReader for file access...

Something like:


Dim file As New System.IO.StreamReader("c:\test.txt")
Dim oneLine As String
oneLine = file.ReadLine()
While (oneLine <> "")
   Dim myArray() As String = Split(oneLine, ",")
   'Now do somethign mith your array (i.e., save to DB)
   ...
   oneLine = file.ReadLine()
End While
file.Close()




Wow, that's great! Thanks..

____________________________
CLIPER
06-05-2006 at 05:07 AM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : ASP.Net : ASP.NET Import/Export
Previous Topic (How change vb6 code to Asp.Net code)Next Topic (Inserting a banner...) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder