Smitesh Patel

Greenhorn
+ Follow
since Aug 08, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Smitesh Patel

Hi there

I have found out where the problem is occuring.
Actually I have the image data which i have converted to bytes & sending it to my servlet in small chunks .Then on the servlet I am opening an input stream & writing all the data from that inputstream to ByteArrayOutputStream till read() doesn't = -1 .
Then i am converting the data written to the ByteArrayOutputStream to byteArr[] & then inserting that byte[] into the database.

Here the problem is occuriing the whole byte[] is not getting properly inserted into the database & thats why i am facing difficulty in fetching that data.

So kindly guide me how to write a byte[] into Sql Server database having datatype "image" & how to retrieve the same.

If possible provide me some code.

Thanks
Hello,

I have made an application in which i am selecting some files & sending that files data dividing into chunks to the database.
What i want to do is when the sending process begins i want to display a progress bar till all the selected files data have been sent..

So how can i do this..
IF POSSIBLE PROVIDE ME SOME CODE AS I HAVE TO COMLETE THIS APPLICATION AS SOON AS POSSIBLE..

Thanks
12 years ago
Hi,

The exception is java.lang.NullPointerException.
Also if it the image data is null then is it possible that it can give this NullPointerException??

Thanks
Hello,

I would like to know how to get the image data of data-type "image" stored in Microsoft's MS Sql Server Database using which JDBC method .

I tried using getBinary() but throws an exception.

And if i am in a wrong direction then which datatype available in Microsoft's MS Sql Server Database should i use for storing images & which method can i use to access that data using JDBC??

Thanks
[ September 11, 2005: Message edited by: Bear Bibeault ]
hello ,

I want to add the contact in the ContactList using ContactList.importContact(contact) method .I know how to add usign the addString method of the Contact class .So pls inform me abt the use of importContact() method.





public void storeContact(byte[] b )
{
try
{
ContactList cList = (ContactList)PIM.getInstance().openPIMList(listType, PIM.WRITE_ONLY);
Contact contact = cList.createContact();
PIMItem[] item = new PIMItem[1];
ByteArrayInputStream bContact = new ByteArrayInputStream(b);
item = PIM.getInstance().fromSerialFormat(bContact,"UTF-8");
// String st = item[0].getString(Contact.REVISION,0);
// System.out.println(st);

contact = (Contact)item[0];
cList.importContact(contact);





}
catch(Exception e)
{
System.out.println("End of String"+e.toString());
}

}

byte b is the array of VCARD data
12 years ago
hello Mark,

First of all thanks for reply

I have dohe all the settings and its running well on toolkit but when i m running that application on phone its stop parsing xml.

Does its require to download the parser .jar file separately on phone or
its takes .

pls help me out

thanks again
smitesh
12 years ago
I have been using J2ME supported sax parser 'Sparta ' on J2ME wireless toolkit .I have been gettng no classdefFoundException.though I have already imported all the classes.
May it may be heavy fo r mobile devices i thought but sparta page says it supports J2ME
but I m not able to get pls help me out

thanks
smitesh
12 years ago