89323

89323



EF 5 Features

Spatial Data Type (Geometry type support). Spatial data types support is backed up by the server

capabilities which are documented at: Section 12.18, “Spatial Extensions" There are different types for

spatial data, and the instantiable types that are supported at MySQL are:

Point, LineString, Polygon, GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon.

At Connector/Net these different types can be managed with the new Geometry type. Before

Connector/Net 6.7 the Geometry types didn't have a MySql Type inside the driver. So most of the users

had to use it by using a binary type. This is not longer needed. Now all the specific operations for any

Geometry type can be done by using this newclass.

An example of howto write a point data is shown here using Connector/Net 6.7 and MySQL Server 5.6.7 or further.

//Storing a geometry point MySąlConnection conn - new

MySąlConnection("3erver-1ocalhost;userid-root;database-testgeo;"); conn.Open();

MySąlCommand cmd = new MySąlCommand("CREATE TABLE Test (v Geometry NOT NULL)");

cmd.Connection = conn; cmd.ExecuteNonQuery();

cmd ■ new MySąlCommand("INSERT INTO Test VALUES(GeomFromText(?v))", conn); cmd.Parameters.Add("?v",MySqlDbType.String); cmd.Parameters[0].Value = "POINT(47.37-122.21)"; cmd.ExecuteNonQuery();

cmd.CommandText = "SELECT AsText(v) FROM Test"; using(MySąlDataReader reader = cmd.ExecuteReader())

{

reader.Read();

varval - reader.GetValue(0);

Console.WriteLine(val);

)

conn.Close();



Wyszukiwarka

Podobne podstrony:
Data types. These data type changes have been implemented: •    MySQL now permits fra
fuel tank fuel type Fuel Tank Fuel tank capacity is 10.5 f (2.8 US gal) in-cluding 2.5 f (0.66 US ga
Slajd16 (113) Hun]RAM types The traditional RAM type is DRAM (dynamie RAM). The other type is SRAM (
page16 (4) Type 3 ■ VW1500 A ■ VW1600 TL Due to its new body design the VW 1600 TL differs distinctl
Tajemnice BIOS u firmy AWARD str 9 ACPI Suspend Type Wake-Up by PCI card/LAH ACPI Suspend Type Sl(
oak sih6 118 The ncxt Type XIV sword, in even finer condition, is now, I believe, in the Nationalmu
fuel tank fuel type Fuel Tank Fuel tank capacity is 10.5 ( (2.8 US gal) in-cluding 2.5 f (0.66 US ga
Supported corwersions. Supported conversions between different but similar data types are shown in t
Wanted! Good students w ho wnte and type and are interested In working hard to re
piraha0123 NOT* : THE BEST METHOD OF SETTINO UF THE OEAACHANOE IS BY THE USE OF A MORSE TYPE FU
pieces detachees HLG HST 07 Magneto France type G. H. Avance variable pour types HLG et HST. Magnet
tarif pieces?tachees terrot HLG HST Magneto France type G. H. Avance variable pour types HLG et HST
Thinking about Learning Stop shartng O Type hcre to soaicho o (& meetgccge.co™ is sharing your
FeaturesiLO Standard Two-Factor authentication (Kerberos support) Virtual Media* Integrated Remote

więcej podobnych podstron