Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java
import java.util.regex.*;
import java.sql.*;
    
public class Telecom {
 
    public Telecom(){
            connect();
                                        }
    public void connect(){
        try{
                       
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          String db= "jdbc:odbc:Driver={Microsoft Access Driver " + "(*.mdb, *.accdb)};DBQ=D:\\TelecomeDatabase.mdb";
 
          Connection con = DriverManager.getConnection(db);
          Statement st = con.createStatement();
          String sql = "select * from CustomerInfo";
          ResultSet rs = st.executeQuery(sql);
          
    
                    while (rs.next())
                    {
                            
    String record = rs.getString("RecordNo");
    String file = rs.getString("FileNo");
    String Deposit = rs.getString("Deposite");
                            
// Deposit                                           
                                                    
                            String pattern1="UiRCcOs74Q3oiro9v6oSfw==";
                            String pattern2="0iMNFDYVBEEO3GpeehM2CA==";
                            
         boolean patternMatched1 = Pattern.matches(pattern1, Deposit);	
         boolean patternMatched2 = Pattern.matches(pattern2, Deposit);
                            
                            if(!(patternMatched1||patternMatched2))
                            {
                                   
                            System.out.println(file+ "..."+record+"...Deposit");
                            }
                            
// Balance                            
                            
                            String Balance = rs.getString("Balance");
                            
                            String pattern3="DFRnh7oBC9LDv0C92bHbGg==";
                            String pattern4="PncOzpz3N\\+RmEODQoQGPxg==";
                            
        boolean patternMatched3 = Pattern.matches(pattern3, Balance);	
        boolean patternMatched4 = Pattern.matches(pattern4, Balance);
                            
                            if(!(patternMatched3||patternMatched4))
                            {
                                   
                            System.out.println(file+ "..."+record+"...Balance");
                            }
                            
                            String CreditRate = rs.getString("CreditRate");
                            
                            String pattern5="OiTWdthYeBQoIuEWrqPCtg==";
                            String pattern6="kuYahrq16NK1HikHf\\+YuMg==";
                            String pattern7="tmpM9sJUbcf08DoWzE2ldA==";
                            String pattern8="ieWCqWGkCXeaudyQDzgYGA==";
                            
        boolean patternMatched5 = Pattern.matches(pattern5, CreditRate);	
        boolean patternMatched6 = Pattern.matches(pattern6, CreditRate);
        boolean patternMatched7 = Pattern.matches(pattern7, CreditRate);	
        boolean patternMatched8 = Pattern.matches(pattern8, CreditRate);
                            
                            if(!(patternMatched5||patternMatched6||patternMatched7||patternMatched8))
                            {
                                System.out.println(file+ "..."+record+"...Credit Rate");
                            }
                           
 }
                
} catch(Exception ex){
      
  }
          }
    
    
    
    public static void main(String[] args) {
                
        new Telecom();
        
    }
}
Posted 4-Jan-13 19:54pm
Edited 4-Jan-13 19:59pm
v2
Comments
Sandeep Mewara at 5-Jan-13 1:59am
   
You ask for report generation and put a code dump... can be little specific?
alexpandy1 at 5-Jan-13 2:06am
   
Hi i need the URL to type while generating ireport using NETBeans but its showing error always for the CONNECTION URL is wrong

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You did not solve your real problem[^] - please go for that first.
It does't get better when you ignore it.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web03 | 2.8.140926.1 | Last Updated 5 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100