It's not a secret anymore!*
The moose likes JDBC and the fly likes inserting byte[] into MS Access Database... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "inserting byte[] into MS Access Database..." Watch "inserting byte[] into MS Access Database..." New topic
Author

inserting byte[] into MS Access Database...

Moiez Gohar
Greenhorn

Joined: Mar 26, 2009
Posts: 8
i am having problems inserting a byte array into an ms access database table. The first column of my table must accept a byte array, and the next column accepts a BigDecimal. I have successfully created the table "Encrypted_AES_Bytes" with the abovenamed columns. But i m unable to insert any rows. here's my code:




i get the following error: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
please HELP.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
What data types have those two attributes in the DB?


Ping & DNS - my free Android networking tools app
Moiez Gohar
Greenhorn

Joined: Mar 26, 2009
Posts: 8
thanks Ulf for your attention...
The data type of the first column is byte[], and the second column's data type is NUMERIC. (as NUMERIC is the corresponding data type name for the JDBC data type BigDecimal.) or am i wrong in mapping JDBC data types to corresponding data type name in MS Access Database?? please guide me... my objective is to store byte array in the first column and BigInteger or BigDecimal (any one will do) in the next. please guide me.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: inserting byte[] into MS Access Database...
 
Similar Threads
convert Double to BigInteger and retrieving byte array
Inserting BLOB data
how to insert a byte array into an MS Access database
how to insert byte[] into mysql database
insert checked checkbox into table