I was so excited to try BLinq, but... After I ran the tool (no errors) and got web-site created, the generated code cannot be compiled:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
Source Error:
Line 103: // This method gets sorted and paged records of all CONTAINERs filtered by a specified field.
Line 104: // Do not change this method.
Line 105: public static IQueryable<CONTAINER> GetCONTAINERs(string tableName, Int32 CONTAINERs_ID, Int32 CONTAINERs_ID, Int32 CONTAINERs_ID, string sortExpression, int startRowIndex, int maximumRows) {
Line 106: IQueryable<CONTAINER> x = GetFilteredCONTAINERs(tableName, CONTAINERs_ID, CONTAINERs_ID, CONTAINERs_ID);
Line 107: return x.SortAndPage(sortExpression, startRowIndex, maximumRows, "ID");
This sounds like it may be a bug in the Blinq code generator. You can get around it by removing the duplicate CONTAINERs_ID parameters to the GetCONTAINERs and GetFilteredCONTAINERs methods. Please tell me if this works for you.
Polita Paulus
This posting is provided "AS IS" with no warranties, and confers no rights.
There are more of these actually. Here is the "Show Detailed Compiler Output" (below)
I guess there is something in the schema that makes BLink go bannanas.
---
C:\WINDOWS\system32> "C:\Program Files\LINQ Preview\Bin\csc.exe" /noconfig /fullpaths @"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\coreweb\2138498a\e1e503be\3-ez6-o6.cmdline"
Microsoft (R) Visual C# 2005 Compiler version 8.00.50916
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
c:\CoreWeb\App_Code\StaticMethods.cs(105,100): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(105,121): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(111,109): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(111,130): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(125,87): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(125,108): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(318,103): error CS0100: The parameter name 'CYCLECOUNTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(324,112): error CS0100: The parameter name 'CYCLECOUNTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(336,89): error CS0100: The parameter name 'CYCLECOUNTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(480,85): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(480,101): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(486,94): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(486,110): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(500,77): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(500,93): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(857,91): error CS0100: The parameter name 'PALLETs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(863,100): error CS0100: The parameter name 'PALLETs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(875,81): error CS0100: The parameter name 'PALLETs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1019,124): error CS0100: The parameter name 'PREFERREDLOCATIONs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1025,133): error CS0100: The parameter name 'PREFERREDLOCATIONs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1037,103): error CS0100: The parameter name 'PREFERREDLOCATIONs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1184,123): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1184,152): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1190,132): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1190,161): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1204,103): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1204,132): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1286,112): error CS0100: The parameter name 'RECEIVINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1292,121): error CS0100: The parameter name 'RECEIVINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1304,95): error CS0100: The parameter name 'RECEIVINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1388,174): error CS0100: The parameter name 'RECEIVINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1394,183): error CS0100: The parameter name 'RECEIVINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1410,156): error CS0100: The parameter name 'RECEIVINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1498,112): error CS0100: The parameter name 'REPLENISHMENTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1504,121): error CS0100: The parameter name 'REPLENISHMENTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1516,95): error CS0100: The parameter name 'REPLENISHMENTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1791,120): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1791,148): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1797,129): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1797,157): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1811,101): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1811,129): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1896,109): error CS0100: The parameter name 'SHIPPINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1902,118): error CS0100: The parameter name 'SHIPPINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1914,93): error CS0100: The parameter name 'SHIPPINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1998,168): error CS0100: The parameter name 'SHIPPINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2004,177): error CS0100: The parameter name 'SHIPPINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2020,151): error CS0100: The parameter name 'SHIPPINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,88): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,105): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,122): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,139): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,97): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,114): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,131): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,148): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,79): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,96): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,113): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,130): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2791,103): error CS0100: The parameter name 'SITETOUSERS_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2797,112): error CS0100: The parameter name 'SITETOUSERS_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2809,89): error CS0100: The parameter name 'SITETOUSERS_ID' is a duplicate
After I deleted all that duplicate parameters the application is actually started (and works fine...so far :)
Alex
No, it doesn't work. I'm getting errors that look like this:
'ITEMsDataSource' could not find a non-generic method 'GetITEMs' that has parameters: tableName, ITEMs_ID, ITEMs_ID1, ITEMs_ID2, sortExpression, maximumRows, startRowIndex.
These ITEMs_ID, ..._ID1, ..._ID2 should be passed to those duplicate ITEMs_ID parameters that I deleted.
Hi Alex- glad to hear it´s compiling. The error you´re seeing now is because the ObjectDataSources that point to your methods still have multiple parameters, so they´re looking for methods with all the duplicate parameters. You can fix that up by deleting
the duplicate parameters in the parameter collection on each ObjectDataSource that points to one of the methods you had to change. These will probably be on just GridView pages.
Thanks for your patience. I will look for the root cause of this issue when I return from vacation next week. I´m posting this from an internet cafe in Spain, so it´s hard to figure out exactly what went wrong. :)
Polita Paulus
This posting is provided "AS IS" with no warranties, and confers no rights.
OK, I'll try this, but it seems to me that I shouldn't delete duplicate parameters, rather I need to make them different like ITEM_ID1, ITEM_ID2, etc. If you need a database dump to reproduce this, just let me know.
Alex, a database schema dump would be really helpful. You can omit the data. I´ll send you a private message with an email address where to send it, and then I´ll post a workaround here as soon as I can repro and research it.
Polita Paulus
This posting is provided "AS IS" with no warranties, and confers no rights.
I am seeing this error too. Blinq worked fine on our support database but stumbled on a production system "real" database. If Alex has not been able to provide a schema, please let me know and I'll send ours.
Another feature I'd suggest is adding a facility to specify which tables to include (or exclude) in the generated application. Often there will be billing record or transaction/audit tables that you really would not want editable.
Anyway - nice work and an excellent way to deomnstrate the power of the new linq stuff.
Alex sent his schema and we worked together to fix his issue. If yours is the same as his, you'll need to do two things:
1. For each compilation error, go to the method that has duplicate parameters and delete all but one of the identical parameters. If the method calls into another method with the duplicate parameters, delete all but one parameter instance.
2. For each compilation error you fixed, go to the webpage that shows data from this method. This should be a page with a GridView on it. From the ObjectDataSource on the page, remove all but one of the duplicate SelectParameters.
Rerun the page. It should all work after those changes.
I did think about adding an option to specify which tables Blinq should include, but ultimately I decided that would be a messy option for a command line application. You can delete the pages generated for tables you don't wish to expose, and the effect
will be the same.
Thanks for the suggestion and feedback, and I hope the fix works for you and you can go on holiday anyways. [:)]
Polita
Polita Paulus
This posting is provided "AS IS" with no warranties, and confers no rights.
alexsimkin
Member
25 Points
5 Posts
Code Generation Error
Jun 23, 2006 07:16 PM|LINK
I was so excited to try BLinq, but... After I ran the tool (no errors) and got web-site created, the generated code cannot be compiled:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
Source Error:
phuff
Contributor
2700 Points
547 Posts
Microsoft
Re: Code Generation Error
Jun 23, 2006 08:51 PM|LINK
This posting is provided "AS IS" with no warranties, and confers no rights.
alexsimkin
Member
25 Points
5 Posts
Re: Code Generation Error
Jun 23, 2006 08:56 PM|LINK
There are more of these actually. Here is the "Show Detailed Compiler Output" (below)
I guess there is something in the schema that makes BLink go bannanas.
---
C:\WINDOWS\system32> "C:\Program Files\LINQ Preview\Bin\csc.exe" /noconfig /fullpaths @"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\coreweb\2138498a\e1e503be\3-ez6-o6.cmdline"
Microsoft (R) Visual C# 2005 Compiler version 8.00.50916
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
c:\CoreWeb\App_Code\StaticMethods.cs(105,100): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(105,121): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(111,109): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(111,130): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(125,87): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(125,108): error CS0100: The parameter name 'CONTAINERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(318,103): error CS0100: The parameter name 'CYCLECOUNTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(324,112): error CS0100: The parameter name 'CYCLECOUNTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(336,89): error CS0100: The parameter name 'CYCLECOUNTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(480,85): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(480,101): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(486,94): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(486,110): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(500,77): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(500,93): error CS0100: The parameter name 'ITEMs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(857,91): error CS0100: The parameter name 'PALLETs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(863,100): error CS0100: The parameter name 'PALLETs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(875,81): error CS0100: The parameter name 'PALLETs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1019,124): error CS0100: The parameter name 'PREFERREDLOCATIONs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1025,133): error CS0100: The parameter name 'PREFERREDLOCATIONs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1037,103): error CS0100: The parameter name 'PREFERREDLOCATIONs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1184,123): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1184,152): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1190,132): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1190,161): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1204,103): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1204,132): error CS0100: The parameter name 'RECEIVINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1286,112): error CS0100: The parameter name 'RECEIVINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1292,121): error CS0100: The parameter name 'RECEIVINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1304,95): error CS0100: The parameter name 'RECEIVINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1388,174): error CS0100: The parameter name 'RECEIVINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1394,183): error CS0100: The parameter name 'RECEIVINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1410,156): error CS0100: The parameter name 'RECEIVINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1498,112): error CS0100: The parameter name 'REPLENISHMENTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1504,121): error CS0100: The parameter name 'REPLENISHMENTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1516,95): error CS0100: The parameter name 'REPLENISHMENTs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1791,120): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1791,148): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1797,129): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1797,157): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1811,101): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1811,129): error CS0100: The parameter name 'SHIPPINGHISTORies_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1896,109): error CS0100: The parameter name 'SHIPPINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1902,118): error CS0100: The parameter name 'SHIPPINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1914,93): error CS0100: The parameter name 'SHIPPINGLINEs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(1998,168): error CS0100: The parameter name 'SHIPPINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2004,177): error CS0100: The parameter name 'SHIPPINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2020,151): error CS0100: The parameter name 'SHIPPINGORDERs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,88): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,105): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,122): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2256,139): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,97): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,114): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,131): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2262,148): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,79): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,96): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,113): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2280,130): error CS0100: The parameter name 'STOCKs_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2791,103): error CS0100: The parameter name 'SITETOUSERS_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2797,112): error CS0100: The parameter name 'SITETOUSERS_ID' is a duplicate
c:\CoreWeb\App_Code\StaticMethods.cs(2809,89): error CS0100: The parameter name 'SITETOUSERS_ID' is a duplicate
alexsimkin
Member
25 Points
5 Posts
Re: Code Generation Error
Jun 23, 2006 09:32 PM|LINK
Polita,
After I deleted all that duplicate parameters the application is actually started (and works fine...so far :)
Alex
alexsimkin
Member
25 Points
5 Posts
Re: Code Generation Error
Jun 23, 2006 09:36 PM|LINK
No, it doesn't work. I'm getting errors that look like this:
'ITEMsDataSource' could not find a non-generic method 'GetITEMs' that has parameters: tableName, ITEMs_ID, ITEMs_ID1, ITEMs_ID2, sortExpression, maximumRows, startRowIndex.
These ITEMs_ID, ..._ID1, ..._ID2 should be passed to those duplicate ITEMs_ID parameters that I deleted.
phuff
Contributor
2700 Points
547 Posts
Microsoft
Re: Code Generation Error
Jun 24, 2006 01:53 PM|LINK
Hi Alex- glad to hear it´s compiling. The error you´re seeing now is because the ObjectDataSources that point to your methods still have multiple parameters, so they´re looking for methods with all the duplicate parameters. You can fix that up by deleting the duplicate parameters in the parameter collection on each ObjectDataSource that points to one of the methods you had to change. These will probably be on just GridView pages.
Thanks for your patience. I will look for the root cause of this issue when I return from vacation next week. I´m posting this from an internet cafe in Spain, so it´s hard to figure out exactly what went wrong. :)
This posting is provided "AS IS" with no warranties, and confers no rights.
alexsimkin
Member
25 Points
5 Posts
Re: Code Generation Error
Jun 25, 2006 01:03 AM|LINK
Polita,
OK, I'll try this, but it seems to me that I shouldn't delete duplicate parameters, rather I need to make them different like ITEM_ID1, ITEM_ID2, etc. If you need a database dump to reproduce this, just let me know.
Alex
phuff
Contributor
2700 Points
547 Posts
Microsoft
Re: Code Generation Error
Jun 25, 2006 04:52 PM|LINK
Alex, a database schema dump would be really helpful. You can omit the data. I´ll send you a private message with an email address where to send it, and then I´ll post a workaround here as soon as I can repro and research it.
This posting is provided "AS IS" with no warranties, and confers no rights.
xystus
Member
5 Points
1 Post
Re: Code Generation Error
Jul 10, 2006 08:21 PM|LINK
I am seeing this error too. Blinq worked fine on our support database but stumbled on a production system "real" database. If Alex has not been able to provide a schema, please let me know and I'll send ours.
All I need now is the source to Blinq please ; ) so I can modify it to also generate a BLL layer a la the tutorial site (http://www.asp.net/learn/dataaccess/default.aspx?tabid=63) - then I can go on holiday for a few weeks!
Another feature I'd suggest is adding a facility to specify which tables to include (or exclude) in the generated application. Often there will be billing record or transaction/audit tables that you really would not want editable.
Anyway - nice work and an excellent way to deomnstrate the power of the new linq stuff.
phuff
Contributor
2700 Points
547 Posts
Microsoft
Re: Code Generation Error
Jul 10, 2006 09:39 PM|LINK
Alex sent his schema and we worked together to fix his issue. If yours is the same as his, you'll need to do two things:
1. For each compilation error, go to the method that has duplicate parameters and delete all but one of the identical parameters. If the method calls into another method with the duplicate parameters, delete all but one parameter instance.
2. For each compilation error you fixed, go to the webpage that shows data from this method. This should be a page with a GridView on it. From the ObjectDataSource on the page, remove all but one of the duplicate SelectParameters.
Rerun the page. It should all work after those changes.
I did think about adding an option to specify which tables Blinq should include, but ultimately I decided that would be a messy option for a command line application. You can delete the pages generated for tables you don't wish to expose, and the effect will be the same.
Thanks for the suggestion and feedback, and I hope the fix works for you and you can go on holiday anyways. [:)]
Polita
This posting is provided "AS IS" with no warranties, and confers no rights.