resultset

Getting a ResultSet/RefCursor over a database link

From the answers to http://stackoverflow.com/questions/1122175/calling-a-stored-proc-over-a-dblink it seems that it is not possible to call a stored procedure and get the ResultSet/RefCursor back if you are making the SP call across a remote DB link. We are also using Oracle 10g. We can successfully get single value results across the l...

Oracle doesn't remove cursors after closing result set

Note: we reuse single connection. ************************************************ public Connection connection() {                try {            if ((connection == null) || (connection.isClosed()))            {               if (connection!=null) log.severe("Connection was closed !");                connection = DriverManager.getConn...

Java, Sychronize JTable and ResultSet

Hello, I have JTable, And AbstarctDataModel with fill(ResultSet rs) methods. How to correct synchronize cursor of JTable with ResultSet's cursor? Any links? Thanx a lat. P.S. Please, add AbstractTableModel tag -- Canton of Uri's citizen ...

SQL Server Cursor data as result of stored procedure

Hello, I have a stored procedure DECLARE cursor FOR SELECT [FooData] From [FooTable]; OPEN cursor ; FETCH NEXT FROM cursor INTO @CurrFooData; WHILE @@FETCH_STATUS = 0 BEGIN SELECT @CurrFooData AS FooData; INSERT INTO Bar (BarData) VALUES(@CurrFooData); FETCH NEXT FROM cursor INTO @CurrFooData; END; CLOSE cursor DEALLOCATE curs...

Getting results in a result set from dynamic SQL in Oracle

This question is similar to a couple others I have found on StackOverflow, but the differences are signficant enough to me to warrant a new question, so here it is: I want to obtain a result set from dynamic SQL in Oracle and then display it as a result set in a SqlDeveloper-like tool, just as if I had executed the dynamic SQL statement...

Convert SQLCEResultSet resultview to datatable

Is it possible to convert a sqlceresultset.resultview to datatable? ...

Can I build a resulset from a file in Java?

I don't have much experience working with resultsets, but as ResultSet is an interface, I guess I could implement it to work with a file as a backend. Is this nonsense? Is there any solution already given for my problem? ...

How to get the number of columns from a JDBC Resultset?

I am using CsvJdbc (it is a JDBC-driver for csv-files) to access a csv-file. I don't know how many columns the csv-file contains. How can I get the number of columns? Is there any JDBC-function for this? I can not find any methods for this in java.sql.Resultset. For acessing the file, I use code similar to the example on the CsvJdbc web...

JTable filled with database data is not being updated when columns are reordered.

I have a JTable filled with data of a table of my database (so I used ResultSetTableModel) and using TableRowSorter to sort the rows, as I click in one column of the JTable. The data is displayed in the jTable without problems; But when I sort the JTable by some column table (for example, sorting it by the primary key value), and edit s...

Need a MYSQL query to compare two tables and only output non matching results

I have two tables in my database, one contains a list of items with other information on these items. The other table is contains a list of photographs of these items. The items table gives each item a unique identifier,which is used in the photographs table to identifier which item has been photographed. I need to output a list of it...

MySQL: Is it possible to return a "mixed" dataset?

Hi, I'm wondering if there's some clever way in MySQL to return a "mixed/balanced" dataset according to a specific criterion? To illustrate, let's say that there are potential results in a table that can be of Type 1 or Type 2 (i.e. a column has a value 1 or 2 for each record). Is there a clever query that would be able to directly ret...

Check if edit is valid for database ms-access

I want to be able to check if I can edit a cell in a database with a new object Example method declaration: something.isValid(Object newObject, row, column); Example cases: If the editing cell stores an Number and I give it a String, the method will return false... If the editing cell has to be different than every other entry (uni...

Can you send a full result set to an SQL function?

I am working in Postgres and I need to send in a full result set with many rows and column into a stored procedure or a function. Is this possible? If so, where can I see resources for syntax? OK this is how I have it set up without being able to send in a result set, it forces me to break out comparison logic and put it in two differen...

what is the best way to put resultset data into a text file?

I want to put all the data in the resultset into a text file in the same order. Is there any method to get data in all the rows at once and write to a file or have to write it row by row? ...

Putting sql result set into JList

Hi there. I'm working on my second year project and I'm nearly finished, but I've got a problem. I have a table set up in Oracle that holds user names, recipients, and messages. I wanted to make a contacts list for sending messages that would take the user names and put them into a swing jlist but i cant figure out how. I thought m...

How can I get a iterable resultset from the database using pdo, instead of a large array?

I'm using PDO inside a database abstraction library function query that I've made. I'm using fetchAll(), which if you have a lot of results, is supposed to get memory intensive, so I want to provide an argument to toggle between a fetchAll associative array and a pdo result set that can be iterated over with foreach and requires less me...

Storing Result set into an array

i know this should be simpel and im probably staring straight at the problem but once again im stuck and need the help of the code gurus. im trying too take one row from a column in jdbc, and put them in an array. i do this as follows: public void fillContactList() { createConnection(); try { ...

Sending one record from cursor to another function Postgres

FYI: I am completely new to using cursors... So I have one function that is a cursor: CREATE FUNCTION get_all_product_promos(refcursor, cursor_object_id integer) RETURNS refcursor AS ' BEGIN OPEN $1 FOR SELECT * FROM promos prom1 JOIN promo_objects ON (prom1.promo_id = promo_objects.promotion_id) ...

Convert a ResultSet String Into a Workable Variable to Populate a jTable

I'm building a application that needs to convert a ResultSet String(rs.getString(Names);) into a workable variable to populate a jTable, only one collumn, then the rest I think that I could try by doing a loop. How could I do this? ...

Deep containing and paginating in Cakephp

My Database is formed like this: Recipient belongs to a Distribution, Admin HABTM Distribution Now, when I want to find all the Distributions for which I am an Admin I do as follows: $userid = $this->Session->read('Auth.User.id'); $meineListen = $this->find('all',array( 'contain' => array( 'Recipient' => array( 'id' ), 'A...