wood burning stoves 2.0*
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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: 41629
    
  55
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inserting byte[] into MS Access Database...