StrataFrame Forum

"Ambiguous match found" error

http://forum.strataframe.net/Topic8696.aspx

By Mark Dowlearn - 5/7/2007

I'm working on a web form, trying to bind a control to a specific field in a table named "Site".  Whenever I click in the BindingField property in order to open up a list of available fields to bind to, I receive an error dialog box indicating "Ambiguous Match Found" and the list does not appear.  However, I am able to type a field name into the property and successfully compile and bind the data.

In doing a web search, the references to this error that I could find seemed to indicate one of two problems.  Either:

  • there was a misspelling of a property (for example, siteID in one spot and SiteID with caps coded in another spot)  OR
  • A keyword was used that resulted in the "ambiguous match"

As far as I can tell, neither of these problems match in my case.

The odd thing is that this is the only table I have this problem with, my other tables seem to work ok.  So I am wondering if I am just missing something simple or if there is a problem with something being cached somewhere that is creating the problem.  I also noted that I have a number of fields that start with the same prefix (Roofxxxxxx and lIsxxxxxxxx), so I tried making them more unique to no avail. 

No answers here, only questions! 

Does this ring a bell for anyone?

Mark

The table structure is:

[uSiteID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_Site_uSiteID] DEFAULT (newid()),
[uLocationTypeID] [uniqueidentifier] NULL,
[uTimeZoneID] [uniqueidentifier] NULL,
[uAffiliationID] [uniqueidentifier] NULL,
[cSeatingCapacity] [varchar](25) NULL,
[cSiteName] [varchar](75) NULL,
[cOfficeHours] [varchar](30) NULL,
[cDirections] [varchar](max) NULL,
[cCountryCode] [varchar](3) NULL,
[cAreaCode] [varchar](3) NULL,
[cLocalNumber] [varchar](15) NULL,
[cExtension] [varchar](25) NULL,
[cWebURL] [varchar](255) NULL,
[cLongitude] [varchar](20) NULL,
[cLatitude] [varchar](20) NULL,
[uProjectionMethodNormalID] [uniqueidentifier] NULL,
[iNormalNumberOfScreens] [tinyint] NULL,
[uScreenConfigNormalID] [uniqueidentifier] NULL,
[uScreenAspectRatioNormalID] [uniqueidentifier] NULL,
[uSiteOperatingVoltageID] [uniqueidentifier] NULL,
[uRoofStyleID] [uniqueidentifier] NULL,
[uRoofMaterialID] [uniqueidentifier] NULL,
[cRoofHeight] [varchar](15) NULL,
[uRoofHeightUnitID] [uniqueidentifier] NULL,
[uRoofInternalApproachID] [uniqueidentifier] NULL,
[uRoofAccessStyleID] [uniqueidentifier] NULL,
[lIsAnalogComponentReady] [bit] NULL,
[lIsSDIReady] [bit] NULL,
[lIsHDReady] [bit] NULL,
[lIsOffloadAssistanceAvailable] [bit] NULL,
[lIsAntennaStorageAvailable] [bit] NULL,
[lIsSatelliteClearView] [bit] NULL,
[lIsCCN] [bit] NULL,
[lIsScart] [bit] NULL,
[lIsInternetAccess] [bit] NULL,
[lIsPhoneAccess] [bit] NULL,
[cNotes] [varchar](max) NULL,
[dEntered] [datetime] NULL CONSTRAINT [DF_Site_dEntered] DEFAULT (getdate()),
[dModified] [datetime] NULL CONSTRAINT [DF_Site_dModified] DEFAULT (getdate())

By Mark Dowlearn - 5/8/2007

So after some further digging, here's the answer (I think).

Apparently there *is* a property for a textbox called "Site" -- it doesn't show up in the property box, but it does show up in the dropdown list of available values for the "BindingProperty" property.  And it shows up in intellisense also, as a type System.ComponentModel.ISite.Control.Site and a tooltip description of:

"Gets information about the container that hosts the current control when rendered on a design surface"

So I am assuming that since my table is named Site, this is causing the "ambiguous match".

The thing that threw me off was that this does not show up in the property list.

Looks like I will need to rename my table....

Mark

By StrataFrame Team - 5/9/2007

Yes, an IComponent object has a property called Site that returns an ISite object for the host of the container.  If you're programming in C#, you can just change the case of your property, but if you're programming in VB.NET, you'll have to change the name because it's case insensitive.