<%!
Connection DB_Connection() throws ClassNotFoundException, SQLException,Exception
{
String url = "ÁÖ¼Ò";
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn=DriverManager.getConnection(url,"¾ÆÀ̵ð","ºñ¹Ð¹øÈ£");
return conn;
}
%>
// null°ªÀÌ ÀÖÀ» °æ¿ì °ø¹éÀ» ¸®ÅÏÇÑ´Ù.
public static final String parseNull(String str) {
return parseNull( str, "" );
}
public static final String parseNull(String str, String defaultVal) {
String val = null;
if( str == null || str.equals("") || str.equals("null"))
val = defaultVal;
else
val = str.trim();
return val;
}
/*¹®¼¹øÈ£ »ý¼º*/
public String Random_number(String strn)
{
Random random =new Random();
String str = "";
for(int j = 0; j < 8 ; j++)
{
str = str + random.nextInt();
}
String strs = str.substring(1,9);
return strn+strs;
}
/*CLOB ¾²±â */
public void Bufferwrite(CLOB cl , StringBuffer str) throws SQLException,IOException
{
BufferedWriter writer = new BufferedWriter(cl.getCharacterOutputStream());
writer.write(str.toString());
writer.close();
}
/*CLOB Àбâ*/
public String getClobdata(Reader r) throws IOException
{
if(r!=null)
{
char[] buff = new char[512];
int len = -1;
String clobValue;
StringBuffer buffer = new StringBuffer(512);
while( (len = r.read(buff)) != -1)
{
buffer.append(buff, 0, len);
}
clobValue = buffer.toString();
return clobValue;
} else {
return "";
}
}