tiberius icon indicating copy to clipboard operation
tiberius copied to clipboard

How to insert into a TEXT column

Open marian-nedelescu opened this issue 2 years ago • 0 comments

Hi,

I am trying to bulk insert into a table with TEXT column. This is my code: ColumnType::Text => { let value: Option<&str> = row.get(order); let value = value.map(|v| v.to_string()); new_row.push(value.into_sql());

And it returns an error: called Result::unwrap() on an Err value: BulkInput("invalid data type, expecting Some(VarLenSized(VarLenContext { type: Text, len: 2147483647, collation: Some(Collation { info: 13632521, sort_id: 0 }) })) but found String(Some("405 Method Not Allowed: \"Request did not meet this resource's requirements.\""))")

I didn't found any example of how to insert into a TEXT column. Can you please help me?

Thank you, Marian

marian-nedelescu avatar Oct 31 '23 14:10 marian-nedelescu