|
Make sure the result files are correct and clear!
|
doInBackground
, addView
, openConnection
, makeText
, param
, ResultSet
, and system
(but not all the keywords used) may be given.
Even if the keywords are provided, you still need to know where and how to put them.
#!/usr/bin/bash CLASSPATH=.:/usr/lib/oracle/12.1/client64 CLASSPATH=$CLASSPATH:/usr/lib/oracle/12.1/client64/lib/ojdbc7.jar CLASSPATH=$CLASSPATH:/usr/lib/oracle/12.1/client64/lib/ottclasses.zip export CLASSPATH |
#!/usr/bin/perl print( "Content-type: text/html\n\n" ); use CGI; $query = new CGI; $var = $query->param( 'var' ); # or $var = $query->url_param( 'var' ); $var =~ s/^\s*(\S*)\s*$/$1/; $var =~ s/;|>|>>|<|\*|\?|\&|\|//g; $cmd = "/usr/bin/java -Djava.security.egd=file:/dev/./urandom "; system( $cmd ); |
// Import the following packages to use JDBC. import java.sql.*; import java.sql.DatabaseMetaData; import java.io.*; import oracle.jdbc.*; import oracle.jdbc.pool.OracleDataSource; public class ClassName { public static void main( String args[ ] ) throws SQLException { String user = "C##user.id"; String password = "password"; String database = "65.52.222.73:1521/cdb1"; // Open an OracleDataSource and get a connection. OracleDataSource ods = new OracleDataSource( ); ods.setURL ( "jdbc:oracle:thin:@" + database ); ods.setUser ( user ); ods.setPassword( password ); Connection conn = ods.getConnection( ); Statement stmt = conn.createStatement( ); |
Recommendations
Everything will come from the slides of Weeks 10, 11, 12, 13, 14, and 15, so study them very carefully and one by one. Good luck and may see you again in DATA 525 Data Engineering and Mining in Fall 2024. |