Example #1
0
        private static void load2DParcels(float y0, float x0, Oracle.ManagedDataAccess.Client.OracleCommand command)
        {
            string result = "";

            command.CommandText = "SELECT "
                                  + "b.bfsid, "
                                  + "c.sequence, "
                                  + "p.point.SDO_POINT.y, "
                                  + "p.point.SDO_POINT.x " +
                                  "FROM tile_2D_SU suidx, la_spatialunit su, boundary b, corner c, la_point p " +
                                  "WHERE suidx.roundy = " + (int)y0 + " AND suidx.roundx = " + (int)x0 + " AND " +
                                  "suidx.suid = su.suid AND " +
                                  "su.suid = b.suid AND " +
                                  "b.bfsid = c.boundaryid AND " +
                                  "c.pid = p.pid " +
                                  "GROUP BY b.bfsid, c.sequence, p.point.SDO_POINT.y, p.point.SDO_POINT.x " +
                                  "ORDER BY b.bfsid, c.sequence";
            Oracle.ManagedDataAccess.Client.OracleDataReader dataReader = command.ExecuteReader();
            int j = 0;

            while (dataReader.Read()) // && j++ < 10)
            {
                for (int i = 0; i < dataReader.FieldCount; i++)
                {
                    result += dataReader[i].ToString() + ";";
                }
                result += "n";
            }
            dataReader.Close();
            Console.WriteLine(result);
        }
        public void counttt(out String erreur, out Int32 ss, out Boolean exist)
        {
            erreur = null;
            ss     = 0;
            exist  = false;
            rsql   = "select count(1)  from  AJJ";

            cnx.select(rsql, out erreur, out dr);



            if (erreur == null)
            {
                if (dr.HasRows == true)
                {
                    exist = true;
                    while (dr.Read())
                    {
                        ss = Convert.ToInt32(dr[0]);
                    }
                }
                dr.Close();
            }
        }
Example #3
0
        private static void load3DParcels(float y0, float x0, Oracle.ManagedDataAccess.Client.OracleCommand command)
        {
            string result = "";

            command.CommandText = "SELECT "
                                  + "su.suid, "             //0
                                  + "su.cislo_par, "        //1
                                  + "b.bfid, "              //2
                                  + "b.direction, "         //3
                                  + "c.sequence, "          //4
                                  + "p.point.SDO_POINT.y, " //5
                                  + "p.point.SDO_POINT.x, " //6
                                  + "c.elevation " +        //7
                                  "FROM tile_3D_SU suidx, la_spatialunit su, boundary3D b, corner c, la_point p " +
                                  "WHERE suidx.roundy = " + (int)y0 + " AND suidx.roundx = " + (int)x0 + " AND " +
                                  "suidx.suid = su.suid AND " +
                                  "su.suid = b.suid AND " +
                                  "b.bfid = c.boundaryid AND " +
                                  "c.pid = p.pid " +
                                  "GROUP BY su.suid, su.cislo_par, b.bfid,  b.direction, c.sequence, p.point.SDO_POINT.y, p.point.SDO_POINT.x, c.elevation " +
                                  "ORDER BY su.suid, b.bfid, c.sequence";
            //Oracle.ManagedDataAccess.Types.
            //ListDictionaryInternal
            Oracle.ManagedDataAccess.Client.OracleDataReader dataReader = command.ExecuteReader();
            //STRUCT strukturaBodu = (oracle.sql.STRUCT)dataReader.getObject(3);
            //JGeometry geometrieBodu = JGeometry.load(strukturaBodu);
            int j = 0;

            while (dataReader.Read()) // && j++ < 10)
            {
                for (int i = 0; i < dataReader.FieldCount; i++)
                {
                    result += dataReader[i].ToString() + ";";
                }
                result += "n";
            }
            dataReader.Close();
            Console.WriteLine(result);
        }