-
Hi, I need to insert a long latin-1 encoded string into a varchar(max) column in a MSSQL database. My current attempt is: let long_latin1_string: &[u8];
let long_latin1_string_blob = WithDataType {
value: &mut BlobSlice::from_byte_slice(long_latin1_string).as_blob_param(),
data_type: DataType::Varchar {
length: NonZeroUsize::new(xml.len()),
},
};
ms_connection.execute(sql_query, & long_latin1_string_blob)?; I get this error:
Any idears? Thanks and cheers! |
Beta Was this translation helpful? Give feedback.
Answered by
sportfloh
Jan 26, 2024
Replies: 1 comment 2 replies
-
Aha, I think I found a solution: let mut long_latin1_string_blob = BlobSlice {
is_binary: false,
blob: long_latin1_string,
batch_size: long_latin1_string.len(),
};
ms_connection.execute(sql_query, &mut long_latin1_string_blob.as_blob_param())?; |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
sportfloh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aha, I think I found a solution: