Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 872009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:43:20+00:00 2026-05-15T10:43:20+00:00

I’ve got a problem with the following code pasted below, the problem seems to

  • 0

I’ve got a problem with the following code pasted below, the problem seems to be coming from the openastextstream this carries on from another question:

Set str_text_stream = obj_file.OpenAsTextStream(ForReading, TristateUseDefault) 
response.Write "<table>"
int_j = 0
int_x = 0
Err.number = 0
Do While Not str_text_stream.AtEndOfStream

str_po_insert_sql = "INSERT into tbl_purchase_orders (purchase_order_number, purchase_order_vendor_number, purchase_order_vendor_name) "
str_po_insert_sql = str_po_insert_sql & " VALUES ("

str_line = str_text_stream.readline
    arr_line = Split(str_line, """,""", -1)
    if Ubound(arr_line) <> 2 then
        Response.write "<tr><td>The line " & str_line & " could not be imported.</td></tr>"
        int_x = 1
    else
        int_y = Instr(arr_line(2), """,") - 1
        str_field_0 = Replace(arr_line(0), """", "")
        str_field_0 = Replace(str_field_0, "'", "''")
        str_field_1 = Replace(arr_line(1), "'", "''")
        str_field_2 = Left(arr_line(2), int_y)
        str_field_2 = Replace(str_field_2, "'", "''")
        str_po_insert_sql = str_po_insert_sql & "'" & str_field_0 & "', '" & arr_line(1) & "', '" & str_field_2 & "')"
        rs_po_insert.Open str_po_insert_sql, dbConnection, 3
        if Err.number <> 0 then
            Response.write "<tr><td>The line " & str_po_insert_sql & " was imported.</td></tr>"
        end if
        Err.number = 0
        int_j = int_j + 1
    end if

loop

data from test import:

"4501366934","800002","Clancy Docwra Ltd",04/05/2010 00:00:00
"4501366935","800004","Clancy Docwra Ltd",04/05/2010 00:00:00
"4501366936","800004","Clancy Docwra Ltd",04/05/2010 00:00:00
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T10:43:21+00:00Added an answer on May 15, 2026 at 10:43 am

    This error was being caused by

    str_file_path = Server.MapPath("/COBRA/upload/PJI3.txt")
    
    Server.MapPath
    

    Was no longer functioning due to a IIS file structure change. Strangely, no error was being thrown even though the openstream was not reading any data. Took me a long time to find this!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I am currently running into a problem where an element is coming back from
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.