Subversion Repositories DevTools

Rev

Rev 5908 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5908 Rev 6910
Line 31... Line 31...
31
//              the data that follows and the progress of the operation.
31
//              the data that follows and the progress of the operation.
32
//
32
//
33
//              Output lines:
33
//              Output lines:
34
//                      Status:xxxxx                    - Indicates program status
34
//                      Status:xxxxx                    - Indicates program status
35
//                      Error:xxxxx                     - Error messages
35
//                      Error:xxxxx                     - Error messages
36
//                      Info:ColumnCount                - SQL info: number of Cols of data
36
//                      Info:ColumnCount:x              - SQL info: number of Cols of data
-
 
37
//                      Info:ColumnName:x:name          - SQL info: Names of all of the columns
37
//                      DataStart:                      - Start of SQL response
38
//                      DataStart:                      - Start of SQL response
38
//                      Data:xxxx,yyyy,zzzz,...         - SQL response
39
//                      Data:xxxx,yyyy,zzzz,...         - SQL response
39
//                      DataEnd:                        - End of SQL response
40
//                      DataEnd:                        - End of SQL response
40
//
41
//
41
//              The Data: lines contain coma-seperated fields. The fields are
42
//              The Data: lines contain coma-seperated fields. The fields are
Line 241... Line 242...
241
              //
242
              //
242
              ResultSetMetaData rsmd = rset.getMetaData();
243
              ResultSetMetaData rsmd = rset.getMetaData();
243
              int numberOfColumns = rsmd.getColumnCount();
244
              int numberOfColumns = rsmd.getColumnCount();
244
              System.out.println( "Info:ColumnCount:" + numberOfColumns );
245
              System.out.println( "Info:ColumnCount:" + numberOfColumns );
245
 
246
 
-
 
247
              // The column count starts from 1
-
 
248
              for (int i = 1; i <= numberOfColumns; i++ ) {
-
 
249
                  String name = rsmd.getColumnName(i);
-
 
250
                  System.out.println( "Info:ColumnName:" + i + ":" + name );
-
 
251
              }
-
 
252
 
246
              //
253
              //
247
              //    Return all rows to the user
254
              //    Return all rows to the user
248
              //
255
              //
249
              System.out.println( "DataStart:");
256
              System.out.println( "DataStart:");
250
              while (rset.next ())
257
              while (rset.next ())