Subject | Re: [firebird-support] How to insert characters for barcode code 128 to table via code? |
---|---|
Author | Mark Rotteveel |
Post date | 2019-01-16T13:06:37Z |
On 16-1-2019 03:12, trskopo@... [firebird-support] wrote:
What have you tried? And why doesn't it work for you? This is the same
as inserting any other binary or string value.
For example, in Java you'd use something like
try (PreparedStatement pstmt = connection.prepareStatement("insert into
sometable (barcode) values (?)")) {
pstmt.setBytes(1, barcodeBytes);
// or pstmt.setString(1, barcodeString);
pstmt.executeUpdate();
}
You may want to consider not storing the barcode code 128, but instead
store the value encoded by the barcode.
--
Mark Rotteveel
> For example, I have these characters : Í*B#È4jÎYour question is not very clear, nor have you specified which language.
>
> I can copy paste that characters with flamerobin into Firebird table,
> but how to insert it via code?
What have you tried? And why doesn't it work for you? This is the same
as inserting any other binary or string value.
For example, in Java you'd use something like
try (PreparedStatement pstmt = connection.prepareStatement("insert into
sometable (barcode) values (?)")) {
pstmt.setBytes(1, barcodeBytes);
// or pstmt.setString(1, barcodeString);
pstmt.executeUpdate();
}
You may want to consider not storing the barcode code 128, but instead
store the value encoded by the barcode.
--
Mark Rotteveel