none
Losing Carriage Returns when sending data from sql to ms access

    Question

  • Hi

    The data is store on a SQL 2008 R2 Server. Field type ntext
    When you view the data on VS 2010 you can see

    John Doe
    Open Street 204
    Santa Clara, CA
    US

    On VS 2010 I am using this

    sco_cmd.CommandText = "select cust_add,cust_phone, cust_taxno, cust_contact from bol_cust where cust_id=" & var_int & ";"
    sco_dr = sco_cmd.ExecuteReader()
    sco_dr.Read()
        
    printc2sin_cmd.CommandText = "update print_main set ship_shipadd='" & sco_dr.GetValue(0).ToString & "',ship_shipphone='" & sco_dr.GetValue(1).ToString & "';"
    printc2sin_cmd.ExecuteNonQuery()
    sco_dr.Close()

    the ms access data field is a memo
    but it ends up like this: John Doe Open Street 204 Santa Clara, CA US

    how come I am loosing the carriage returns?

    Please HELP!!!

    don't know what to do!!!

    Thank you all

    Bre-x


    • Edited by Bre-x Monday, April 03, 2017 6:38 PM
    Monday, April 03, 2017 6:23 PM

All replies