iSTORYA.NET

Go Back   iSTORYA.NET > Technology > Software & Games > Programming
: :

Register FAQ Members List Calendar Mark Forums Read

Programming :: Programming related discussions ::

Reply
LinkBack Thread Tools
  #1  
Old 08-26-2008, 09:35 PM
Junior Member
poymode is offline
poymode's Avatar
Join Date: Aug 2006
Posts: 201
Default java, byte, images, database

first..kinsa nakagamit ug digital persona pro nga software? biometrics ni siya


anyway, unsaon man pag store ug byte array sa database, mao man gud ni ang representation sa template sa fingerprint nga makuha gikan sa device. unique combination jud ni siya?

ang gamiton diay kay Java nya MsSql express...sakto ba?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 08-29-2008, 10:08 PM
Junior Member
poymode is offline
poymode's Avatar
Join Date: Aug 2006
Posts: 201
Default

Bumpy Xd........
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 08-30-2008, 09:54 AM
eax
Elite Member
eax is offline
Join Date: Oct 2006
Posts: 1,146
Default

Try blob ang datatype sa imong db.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 09-02-2008, 07:30 PM
Junior Member
poymode is offline
poymode's Avatar
Join Date: Aug 2006
Posts: 201
Default

Hello...bump!

kanang byte array ni akong i store sa DB, unsa akong gamiton nga data type sa SQL? kanang inig fetch sad gikan sa SQL same format ghapon?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 09-02-2008, 08:01 PM
eax
Elite Member
eax is offline
Join Date: Oct 2006
Posts: 1,146
Default

Quote:
Originally Posted by poymode View Post
Hello...bump!

kanang byte array ni akong i store sa DB, unsa akong gamiton nga data type sa SQL? kanang inig fetch sad gikan sa SQL same format ghapon?
Use BLOB na data type.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 09-02-2008, 10:59 PM
Junior Member
poymode is offline
poymode's Avatar
Join Date: Aug 2006
Posts: 201
Default

ahh..thanks ha

ask lang ko, have you tried this out?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 09-03-2008, 07:15 AM
eax
Elite Member
eax is offline
Join Date: Oct 2006
Posts: 1,146
Default

Quote:
Originally Posted by poymode View Post
ahh..thanks ha

ask lang ko, have you tried this out?
Yup. Mao man na ang recommended kung mag-save ka ug binary sa database.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 09-03-2008, 05:58 PM
Newbie
sideon is online now
Join Date: Dec 2004
Posts: 19
Send a message via ICQ to sideon
Default

Agreed. Use blob datatype in your mysql.

Below is the code snippet ...

-----------------------
byte b[] = yourByteArrayHere;

ByteArrayInputStream fis = new ByteArrayInputStream(b);
con = SQLConnection.getConnection();

PreparedStatement ps = con.prepareStatement(YOUR_INSERT_STATEMENT)
ps.setBinaryStream(1, fis);
ps.executeUpdate();

-----------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 09-03-2008, 06:51 PM
Junior Member
poymode is offline
poymode's Avatar
Join Date: Aug 2006
Posts: 201
Default

Ahh...ako gi gamit una kay Image nga data type sa MS SQL 2005. Wa man gud blob, mag ilis ra cguro to MySQL..tnx


ang blob wala nay size needed?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 09-04-2008, 10:10 AM
Newbie
sideon is online now
Join Date: Dec 2004
Posts: 19
Send a message via ICQ to sideon
Default

there's no need to specify its length but you can initialze it if you want to....

imo, why not save your image as a file as an alternative if your database dont have blob datatype!?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11  
Old 09-04-2008, 06:20 PM
Junior Member
poymode is offline
poymode's Avatar
Join Date: Aug 2006
Posts: 201
Default

Im sorry to misinform everyone but It is not an image i am trying to store. It is of type byte[] (byte array)

Maybe I said image because some say byte[] can be an image

how can i store a byte[] into a database?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12  
Old 09-04-2008, 07:42 PM
eax
Elite Member
eax is offline
Join Date: Oct 2006
Posts: 1,146
Default

It is still the same, byte[] can be either a executable file, image, docs, etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13  
Old 09-06-2008, 02:50 PM
C.I.A.
bcasabee is online now
Join Date: Mar 2005
Posts: 2,112
Default

An array in java is an object. So to persist it on a database, insert it as a blob. research about object serialization and object persistence on a database if you want to know more.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
LF: Database Administrator grss1982 Jobs 89 09-11-2008 09:55 AM
How to connect database ingkiang Programming 3 07-15-2008 05:14 PM
NH: VB 6 Database programming The_Undertaker Programming 7 06-12-2008 09:12 AM
Java java.lang.NoClassDefFoundError ares623 Programming 28 05-02-2007 07:03 PM


All times are GMT +8. The time now is 04:32 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
(c) 2002-2008 iSTORYA.NET | Design by DrE | Modifications by BeoR