| |
Data Dynamics Analysis Support
Started by toadrw at 03-11-2010 1:21 PM. Topic has 4 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
03-11-2010, 1:21 PM
|
toadrw
Joined on 03-09-2009
Posts 50
|
An Item with the same key has already been added.
Attachment: Results 1.zip
|
|
|
|
|
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!
|
|
|
|
|
Report
|
|
|
|
03-12-2010, 5:21 AM
|
woodoo
Joined on 03-15-2005
Posts 36
|
Re: An Item with the same key has already been added.
|
|
|
|
|
Hello
You use reserved SQL-Keywoards like 'Date' and 'COUNT'
Change the Columnheadernames, then i think it works
Greeting from Switzerland
John Peter
|
|
|
|
|
Report
|
|
|
|
03-12-2010, 9:51 AM
|
toadrw
Joined on 03-09-2009
Posts 50
|
Re: An Item with the same key has already been added.
|
|
|
|
|
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!
|
|
|
|
|
Report
|
|
|
|
03-13-2010, 11:33 AM
|
woodoo
Joined on 03-15-2005
Posts 36
|
|
|
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
|
|
|
|
|
Report
|
|
|
|
03-19-2010, 9:19 AM
|
toadrw
Joined on 03-09-2009
Posts 50
|
Re: An Item with the same key has already been added.
|
|
|
|
|
Thank you again. We've had our user alias count and date differenlty.
|
|
|
|
|
Report
|
|
|
|
|
GrapeCity » Product Support » Data Dynamics A... » Re: An Item with the same key has already been added.
|
|
|
|
|