ADO reads and writes write written clob fields

xiaoxiao2021-03-06  184

C write

RDS-> Open ("tb_test1", conn.getInterfacePtr (), AdoPENDYNAMIC, ADLOCKTIMISTICISTIC, ADCMDTABLE;

RDS-> addnew (); rds-> fields-> item [1L] -> appendchunk (_variant_t (strfile.c_str ())); RDS-> Update ();

ASP write:

Rs.Open "TB_TEST1", CONN, AdoPENDYNAMIC, ADLOCKOPTIMISTIC, ADCMDTABLE

Rs.addnew

RS ("text"). Appendchunk mytext

Rs.Update

Read:

Size = rs ("text"). Actualsize

Text = rs ("text"). GetChunck (size)

In particular, OLEDB Provider is to choose Oraoledb.Oracle without choosing MSDara.

In addition, ADO requires Table's Clob field to null, otherwise RecordSet.Open will fail.

After Appendchunk, you must follow Update, otherwise it will cause an error of OLEDB.

转载请注明原文地址:https://www.9cbs.com/read-128801.html

New Post(0)