Re: [firebird-support] How to insert characters for barcode code 128 to table via code?

2019-01-16 Thread Mark Rotteveel m...@lawinegevaar.nl [firebird-support]
On 16-1-2019 03:12, trsk...@yahoo.com [firebird-support] wrote:
> For example, I have these characters : Í*B#È4jÎ
> 
> I can copy paste that characters with flamerobin into Firebird table, 
> but how to insert it via code?

Your question is not very clear, nor have you specified which language. 
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


ODP: [firebird-support] How to insert characters for barcode code 128to table via code?

2019-01-16 Thread Karol Bieniaszewski liviusliv...@poczta.onet.pl [firebird-support]
Look also at hex literals
https://firebirdsql.org/refdocs/langrefupd25-hexbinstrings.html

Pozdrawiam,
Karol Bieniaszewski


Re: [firebird-support] How to insert characters for barcode code 128 to table via code?

2019-01-16 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
16.01.2019 3:12, trsk...@yahoo.com [firebird-support] wrote:
> how to insert it via code?

   char buffer[8];
   XSQLDA* sqlda;
.
   sqlda->sqlvar[1].sqldata = buffer;
   memcpy(buffer, YourBarCode, 8);
   isc_dsql_execute(., sqlda);


-- 
   WBR, SD.






++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++


Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/