avijit majumder

Greenhorn
+ Follow
since Sep 01, 2009
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
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by avijit majumder

can any one help about
"Send sms using java application /jsp "
7 years ago
Hi,
I want to handle usb device using jsp or java
can any one help me???
NOTE: I do not want any dll file for configure.I have no access out side of "tomcat/webapps/My_Application" folder
If is possible to handle client computer USB Device using JSP OR Applet or Servlet or Core Java or any java Techno logy that using in web.
_____________________________________________Thanks_______________________________
9 years ago
JSP
Hi,
I want to handle usb device using jsp or java
can any one help me???
NOTE: I do not want any dll file for configure.I have no access out side of " tomcat/webapps/My_Application" folder
Is It possible to handle client computer USB Device using JSP OR Applet or Servlet or Core Java or any java Techno logy that using in web???
_____________________________________________Thanks_______________________________
9 years ago
Hi,
I want to read usb device using java ....any one can help me?
any Example Code or Link?
9 years ago
hi,
I want to upload a file[ image file or any other file ]
I need the functionality --- user brows a file from client computer
and then press Upload button the backGround jsp/java file upload it to my "tomcat 5.5\webapps\TEST\IMAGES" folder.
any one help me???
write the code.
9 years ago
JSP
int choice=0;
while(true)
{
System.out.println("\n press 1 for ... , 2 for .... 3for .... , 4 for EXIT");
choice=Integer.parseInt(br.readLine());
switch (choice)
{
case 1://do somthing...call a method...break;
case 2://..... berak;
case 3://...do some thing break;
case 3: system.exit(1);// or break;
defaule: System.out.println("\n Wrong Key Press TRy Again!");
}
}//end while

9 years ago
hi
Sandeep Parmar
Yes boss there is no any restriction of character langth of
getString(1) method of java

i have already use this
A function of SQL returm a verchar(1000) . Which I retrive in java end just getString(1).

........ as an exam

CREATE FUNCTION `fn_Month_Bwt_Date`() RETURNS text
BEGIN

DECLARE monthstring VARCHAR(1000);

// do your code here

//--------------

RETURN monthstring;
END$$

DELIMITER ;


in java end
String query="select ...from fn_Month_Bwt_Date.."
.....................................
rs.getString(1);

its is working fine

_______________________________________________________
Avijit Majumder

can any code to call German railway
9 years ago
How can I run Multiple Query in A Single ResultSet ?
Example---
String st1="select sum(salary) from v_table where id=2 and post!='manager'";
String st2="select sum(salary) from v_table where post!='staff'";
java.sql.Connection con=....
java.sql.Statement st=con.createStatement();
java.sql.ResultSet rs=st.executeQuery(st1); //-----I put one String ...
while(rs.next()){
//dosome thing.
}
java.sql.ResultSet rs1=st.executeQuery(st2); ///---------I put second string
while(rs1.next()){
//dosome thing.
}

NOTE: I need Only one result Set. and one loop while(rs.next() but the rs content both two result
Like AddBatch--->
java.sql.Statement stmt=con.createStatement();
stmt.addBatch(insert_query1); //insert_query1="insert intto table1 values....
stmt.addBatch(insert_query2); //insert_query2 ="insert intto table2 values....
int[] inserts = stmt.executeBatch(); // both table insert complet


put the mysql driver on your project folder or where the java file run.
the driver -->.JAR File name is mysql-connector-java-3.1.11-bin.jar . [download it from net]
then extract it
after extract three folder com,META-INF,org apper.
Now Run the file. ___IT WORK.
I use mysqlyog for Synchronization.
We are looking for two way DB Synchronization mechanisim/feature. We have requirement that we have same copy fo DB @ N (5) number of remote locations. Each one updated with a local client applications which will be updating the data locally on thier local DB. At the end of day we would like to syncrhonize between all those DB's, so that all the DB has the same data after synch up.

We also would like to do real time if it is possible or with frequent scheduling.

We also have other requirement where we do want to changethe structure of DB(ongoing development) in one Maser DB and push those changes to across all these other remoted DB.
I appreciate all your time and effort in advising this.
---------------------------------------------------------------------------------------------------------------
Source1,Source2---->OF line Computer has local Data Base.Target[ Linux server ] -->on line server has it's local data base.All Data base are Same.
I set time 5.00 to synz between Source1 and Target and 5.20 between Source2 and Target
-----------------------------------------------------------------------------------------------------------
Source1 Target [Linux ] Source2
120 120 120

now I update the field of Source1 set 120 to 100 AND RUN synz with Source1 and Target
Source1    Target [Linux ]     Source2
100 <---synz[2 way]---> 100    120

then I run synz with Source2 and Target
Source1    Target [Linux ]    Source2
100   120 <-----synz[2 way]-----> 120

Problem : I can't found the update value in on my web server[ Linux]
9 years ago

String s1="insert into table values('10','a');
String s2="insert into table values('2','b');
String s3="insert into table values('3','c');
con=com...
java.sql.Statement stmt=con.createStatement();
stmt.addBatch(s1);
stmt.addBatch(s2);
stmt.addBatch(s3);
int[] inserts = stmt.executeBatch();
I use mysqlyog for Synchronization.
We are looking for two way DB Synchronization mechanisim/feature. We have requirement that we have same copy fo DB @ N (5) number of remote locations. Each one updated with a local client applications which will be updating the data locally on thier local DB. At the end of day we would like to syncrhonize between all those DB's, so that all the DB has the same data after synch up.

We also would like to do real time if it is possible or with frequent scheduling.

We also have other requirement where we do want to changethe structure of DB(ongoing development) in one Maser DB and push those changes to across all these other remoted DB.
I appreciate all your time and effort in advising this.
---------------------------------------------------------------------------------------------------------------
Source1,Source2---->OF line Computer has local Data Base.Target[ Linux server ] -->on line server has it's local data base.All Data base are Same.
I set time 5.00 to synz between Source1 and Target and 5.20 between Source2 and Target
-----------------------------------------------------------------------------------------------------------
Source1 Target [Linux ] Source2
120 120 120

now I update the field of Source1 set 120 to 100 AND RUN synz with Source1 and Target
Source1       Target [Linux ]       Source2
100 <---synz[2 way]---> 100         120

then I run synz with Source2 and Target
Source1      Target [Linux ]         Source2
100         120 <-----synz[2 way]-----> 120

Problem : I can't found the update value in on my web server[ Linux]






I want to create id .
My code is ....
public static String getID()
{
try{
String qr="select max(id) from user where id like 'EMS%'";
Connection con....
Ststement st....
rs=st.executeQuery(qr);
while(rs.next()){
if(rs.getString(1)=="" ||rs.getString(1)==null)
{total_id="EMS0000";
return total_id;
}
else
{
id=id.substring(3,4);
total_id="EMS"+(Integer.parseInt(id)+1);
return total_id;
}
}//while
}catch(E.....){}
return total_id;
}//end function


NOTE:----
IN DATA BASE id= EMS0009,EMS0010......THEN MAX(ID) Return EMS0009.......
I want to EMS0010.......PL z HELP ME .

How can I make multiple select Query in a batch

String st1="select password from login where id='"+1+"'";
String st2="select password from login where id='"+2+"'";

java.sql.Connection con=..............;
java.sql.Statement st=con.createStatement();
st.addBatch(st1);
st.addBatch(st2);
java.sql.ResultSet rs=st.executeBatch(); // BUT it return an int Array. int a[]=st.executeBatch();
/*
Now how can I find the RESULT in my ResultSet rs???
pl z help!!!

*/