Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




Custom Field error - Ambiguous column name 'env'.

web-app

Gemini Version: 2.1.1

We recently migrated our Gemini database from SQL Server 2000 to SQL Server 2005.  However, one of the projects keeps getting an error "Ambiguous column name 'env'.". I am not sure why this is cropping up with the different version of SQL Server. I have asked our DBA to change the compatibility mode to SQL Server 2000 to see resolves it. I will post the findings when I know. 

The strange part is that other custom fields work fine.  Below is the dump of the customfielddefs row if that helps.  Any thoughts?

 

customfieldid customfieldname projid isactive screenorder screenlabel screendescription screentooltip maxlen numcols numrows cancreate canedit canview canmultiselect requiredfield regularexp customfieldtype defaultvalue lookupname lookupvaluefield lookuptextfield lookupsortfield created tstam

16 Environment 7 1 1 Environment 0 0 0 1 1 1 0 0 C customfieldenv env env env 2008-02-11 12:44:07.400 0x0000000000039A7C

And the stack trace:

SOURCE: .Net SqlClient Data Provider TARGETSITE: Void xd8280387c605aca4(CounterSoft.Gemini.Commons.CustomFieldEN) STACKTRACE: at CounterSoft.Gemini.DataProvider.CustomFieldProvider.xd8280387c605aca4(CustomFieldEN x5a09e7cd54476202) at CounterSoft.Gemini.DataProvider.CustomFieldProvider.xa291203dfbe52cd9(Int32 xa8708020b9a21a3a, String xebbec3a16b54a08f, Int32 x663e02d322c995c9) at CounterSoft.Gemini.Business.x95da312ae9372c2e.x3ea65f25dee0cd51(IssuesFilterEN x24b748b5be295dcb) at CounterSoft.Gemini.Business.x95da312ae9372c2e.xa91f976c95cc24f6(IssuesFilterEN x24b748b5be295dcb, Int32 x6085dd2d6dae9673, Int32 x870a8f396af517a1, Int32& x42a948eff01be1b6, Int32& x8c5725b36c3fef30, Int32& x93a2c901eb10cf80) at CounterSoft.Gemini.IssuesWeb.BindData() at CounterSoft.Gemini.IssuesWeb.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegatePr

PhilBolduc
· 1
PhilBolduc
Replies (4)
helpful
0
not helpful

Is it possible to send us your table structure for the custom field along with its definition in Gemini?


Saar Cohen
· 5000
Saar Cohen
helpful
0
not helpful

Switching the database to SQL Server 2000 (80) compatibility mode appears to fixed the issue.  It must be related to more strict syntax on SQL Server 2005.  I have seen this with items such as 'WITH NOLOCK' vs 'WITH (NOLOCK)', the latter being the correct syntax.


PhilBolduc
· 1
PhilBolduc
helpful
0
not helpful

CREATE TABLE [dbo].[customfieldenv](
    [env] nvarchar NOT NULL
) ON [PRIMARY]


Custom Field Type: Dropdown Listbox
Screen Order: 1
Screen Label: Environment
Lookup table name: customfieldenv
Lookup key field name: env
Lookup description field name: env
Lookup sort field name: env
Is visible on issue create: yes
Is visible on issue edit: yes
Is visible on issue view: yes

Note that this is on a project that I am not responsible for so, I am not sure how they created the custom field.


PhilBolduc
· 1
PhilBolduc
helpful
0
not helpful

The best way to fix this is to add a new column say envkey nvarchar(25) and copy the env column data into it. Then modify the definition in Gemini for the key field to be envkey


Saar Cohen
· 5000
Saar Cohen