Oracle调用上的空结果集JDBC

时间:2018-06-03 22:09:56

标签: java eclipse oracle jdbc

出于某种原因,当我的数据库中存储了记录时,我得到一个空的结果集。有没有人看到我的代码?我正在使用JDBC和Java。如果有人能指出我正确的方向,这将是美好的。谢谢。

//BasePlugin.php
abstract class BasePlugin
{
     public function displayContent() 
    {
        print "<p>Base Plugin</p>";
    }
};



//ExamplePlugin.php -> In specific plugin directory.

require('../BasePlugin.php');

class ExamplePlugin extends BasePlugin
{

    public static function Instance()
    {
        static $inst = null;
        if ($inst === null) {
            $inst = new ExamplePlugin();
        }
        return $inst;
    }

    public function displayContent() 
    {
        print "<p>Example Plugin</p>";
    }
}




//PluginLoader.php

foreach($pluginFile : PluginFilesInDirectory) { // Iterate over plugin php files in plugin directory
$plugin = GetPlugin($pluginFile); // Somehow get instance of plugin.
echo plugin->displayContent();
}

这是人类:

List<Person> login_account = new ArrayList<Person>();
            Connection conn = cf.getConnection();
            Statement stmt;
            stmt = conn.createStatement();
            ResultSet rs;
            rs = stmt.executeQuery("SELECT USERNAME, PASSWORD, ACCOUNT_LEVEL FROM BANKING_ACCOUNTS");
            Person person = null;

            while(rs.next()) {
                person = new Person( rs.getString("USERNAME"), rs.getString("PASSWORD"), rs.getString("ACCOUNT_LEVEL"));
                login_account.add(person);
            }

这是与之关联的sql:

    public Person(String username, String password, String account_level) {
    // TODO Auto-generated constructor stub
    this.username = username;
    this.password = password;
    this.account_level = account_level;
}

这是附加到itL

的Sql代码

0 个答案:

没有答案