prisma / tiberius

TDS 7.2+ (Microsoft SQL Server) driver for Rust
Apache License 2.0
325 stars 119 forks source link

How to insert into a TEXT column #319

Open marian-nedelescu opened 11 months ago

marian-nedelescu commented 11 months ago

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