Hi,
I am trying to connect to Oracle dataset (10G) to see a layer using the sample "LoadAnOracleFeatureLayer.aspx" file provided. While doing so, I get a message "ORA-00936: missing expression".
What am I missing?!
The code-behind code is:
using System;
using System.Web.UI;
using ThinkGeo.MapSuite.Core;
using ThinkGeo.MapSuite.WebEdition;
namespace CSSamples.Samples.DataProviders
{
public partial class LoadAnOracleSpatialFeatureLayer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#B3C6D4"));
Map1.CurrentExtent = new RectangleShape(-140, 60, 140, -60);
Map1.MapUnit = GeographyUnit.DecimalDegree;
// The following two lines of code enable the client and server caching.
// If you enable these features it will greatly increase the scalability of your
// mapping application however there some side effects that may be counter intuitive.
// Please read the white paper on web caching or the documentation regarding these methods.
// Map1.StaticOverlay.ClientCache.CacheId = "WorldOverlay";
// Map1.StaticOverlay.ServerCache.CacheDirectory = MapPath("~/ImageCache/" + Request.Path);
// Please modify the visible property of the map in .aspx file if you load the map from MsSQL2008
// using following code.
Map1.Visible = true;
LoadAnOracleVectorLyer();
}
}
private void LoadAnOracleVectorLyer()
{
//string connectString = "User ID=userid;Password=password;Data Source=192.168.0.178/orcl;";
//OracleFeatureLayer oracleLayer = new OracleFeatureLayer(connectString, "states", "recid");
string connectString = "User ID=spatialdat;Password=spatialdat;Data Source=ora102w;";
OracleFeatureLayer oracleLayer = new OracleFeatureLayer(connectString, "SP_PARCEL", "GID");
oracleLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
oracleLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Map1.StaticOverlay.Layers.Add(oracleLayer);
}
}
}
"SP_PARCEL" table has a geometry column and "GID" is the unique identified within that table. No changes done to the *.aspx markup code.
Any suggestions would be appreciated.
Regards,
Praveen