none
send file hyperlink RRS feed

  • Question

  • i have a document management software which reads the contents of the file and picks following information from the document for example order_no and saves the files with name order_no.pdf and stores it in a folder called https://myfolder/order_no.pdf , i need to send this path to oracle database field in a table where order_no is a column. Is ther a way to do it.

    Friday, January 31, 2020 7:40 PM

All replies

  • Remember that https://myfolder/order_no.pdf is a URL, not a file path.  You can't store a file using that path.  You have to store it in the file system of the web server.  Is your app running on the web server, or do you have access to it?

    Once you have an order number, it is easy enough to create a string with the appropriate URL and store it in your database.  So, what code do you have so far?


    Tim Roberts | Driver MVP Emeritus | Providenza & Boekelheide, Inc.

    Sunday, February 2, 2020 4:58 AM
  • Hi Arif_dxb,
    As Tim Roberts said, the https://myfolder/order_no.pdf is a URL, not a file path.
    And do you want to send the string "https://myfolder/order_no.pdf" to the database field? 
    If so, you can refer to the following simple code example.

    SqlDesigner.ExecuteNoQuery("insert into test(Id,Name) values (111, 'https://myfolder/order_no.pdf')");
    class SqlDesigner
    {
        private static string connStr = @"connectString";
        public static int ExecuteNoQuery(string sql)
        {
            using (SqlConnection conn = new SqlConnection(connStr))
            {
                conn.Open();
                using (SqlCommand cmd = conn.CreateCommand())
                {
                    cmd.CommandText = sql;
                    return cmd.ExecuteNonQuery();
    
                }
            }
        }
    }

    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 3, 2020 2:58 AM