Subversion Repositories DevTools

Rev

Rev 6910 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6910 Rev 6912
Line 29... Line 29...
29
//              another program, and not a human.
29
//              another program, and not a human.
30
//              Each line constits of a a tag and a data field. The tag describes
30
//              Each line constits of a a tag and a data field. The tag describes
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:x              - 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
//                      Info:ColumnInfo:x:name:width:type   - SQL info: Names of all of the columns and other data
38
//                      DataStart:                      - Start of SQL response
38
//                      DataStart:                          - Start of SQL response
39
//                      Data:xxxx,yyyy,zzzz,...         - SQL response
39
//                      Data:xxxx,yyyy,zzzz,...             - SQL response
40
//                      DataEnd:                        - End of SQL response
40
//                      DataEnd:                            - End of SQL response
41
//
41
//
42
//              The Data: lines contain coma-seperated fields. The fields are
42
//              The Data: lines contain coma-seperated fields. The fields are
43
//                        encoded as 4 bits per byte added to an ascii-0. A cheap
43
//                        encoded as 4 bits per byte added to an ascii-0. A cheap
44
//                        hex encoding.
44
//                        hex encoding.
45
//
45
//
Line 244... Line 244...
244
              int numberOfColumns = rsmd.getColumnCount();
244
              int numberOfColumns = rsmd.getColumnCount();
245
              System.out.println( "Info:ColumnCount:" + numberOfColumns );
245
              System.out.println( "Info:ColumnCount:" + numberOfColumns );
246
 
246
 
247
              // The column count starts from 1
247
              // The column count starts from 1
248
              for (int i = 1; i <= numberOfColumns; i++ ) {
248
              for (int i = 1; i <= numberOfColumns; i++ ) {
-
 
249
                  System.out.println( "Info:ColumnInfo:" + i 
249
                  String name = rsmd.getColumnName(i);
250
                                      + ":" + rsmd.getColumnName(i) 
-
 
251
                                      + ":" + rsmd.getColumnDisplaySize(i) 
250
                  System.out.println( "Info:ColumnName:" + i + ":" + name );
252
                                      + ":" + rsmd.getColumnTypeName(i) );
251
              }
253
              }
252
 
254
 
253
              //
255
              //
254
              //    Return all rows to the user
256
              //    Return all rows to the user
255
              //
257
              //