An Item with the same key has already been added.
Data Dynamics Analysis Support
An Item with the same key has already been added.
03-11-2010, 1:21 PM
I'm getting this error when trying to open an Excel file using the AutoGenerate method of the SchemaBuider.
I see two cases relating to this: 23909 and 137399.
value = SchemaBuilder.AutoGenerate(Name, conn, queryString)
My query string is a simple select:
SELECT * FROM [Results 1$];
And my connection string:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Administrator\Desktop\Results 1.xls;Extended Properties="Excel 8.0;HDR=YES;
Please let me know how to fix this issue. Thanks!
Re: An Item with the same key has already been added.
03-12-2010, 5:21 AM
Hello
You use reserved SQL-Keywoards like 'Date' and 'COUNT'
Change the Columnheadernames, then i think it works
Greeting from Switzerland
John Peter
Re: An Item with the same key has already been added.
03-12-2010, 9:51 AM
This user had both Count and Date as column names in their custom SQL. We fixed Count and it still didn't work so we thought the error was something else. Turns out we just overlooked Date.
Thank you very much for helping us fix this!
Re: An Item with the same key has already been added.
03-13-2010, 11:33 AM
I think, you can't use the Fieldname 'Date' and the Fieldname 'Count'. You have to use Alternate-Names !
SQL="Select [Results 1$].Date As [Results1_Date], [Results 1$].AGENTID As [Results1_AGENTID], [Results 1$].CreditCheckFlag As [Results1_CreditCheckFlag], [Results 1$].COUNT As [Results1_COUNT] From [Results 1$]"
And then use this SQL and the attached Schemafile with the analyser
Greetings from Switzerland
John Peter Woodtli
Re: An Item with the same key has already been added.
03-19-2010, 9:19 AM
Thank you again. We've had our user alias count and date differenlty.