Import text file into Oracle table

I need to build a web page that allows the user to import a text file into an Oracle table.  Does anyone have a code example of doing this?  The text file is not delimited in any way.  I know that you have to use the FilsSystemObject to read the text file.  I need to read the text file line by line and store the data in the Oracle table.  DOes anyone have a code example?

Who is Participating?
RBertoraConnect With a Mentor Commented:
it goes something like this......

identify your tnsnames by finding your tnsnames.ora file

tnsnames.ora_alias =(DESCRIPTION = (ADDRESS = (PROTOCOL=TCP)(Host=
      (CONNECT_DATA = (SID = yourSID)))

then here is the code you would need in asp:

      Set objConn = Server.CreateObject("ADODB.Connection")
      objConn.ConnectionString = "DSN=tnsnames.ora_alias;UID=username;PWD=password"

      Dim fs, a
      Set fs = CreateObject("Scripting.FileSystemObject")
      Set a = fs.OpenTextFile("C:\File.txt")

      if err.number = 0 then
          while not (a.atEndOfStream)

            text_str = a.ReadLine
            SqlString = "Insert into Table (Column) values '" + text_str.Replace("'","''") + "'"
            objConn.SqlString SqlString


      end if

For the uploading part, see...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.