The multi-part identifier .... could not be bound.

Posts   
1  /  2
 
    
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 13-Oct-2012 07:21:05   

I still can't reproduce it. This is what I did:

  1. Since you rename things on the generated code, I uses your project to re-generate code (with the latest v2.5 build). I confirmed that the alias for the line you change is RangeEntity__.

  2. Note that your llblgen project doesn't have any ActionProcedures, however you have a call to that in your manager classes: RangeManager.GetRangeSorted. So I commented that method.

  3. Fix the references so they point to LLBLGen v2.5 assemblies.

  4. Since the catalog at generated code is "caroma.devdorf" and our catalog at db is caromalive2012, I used catalog name overwrites (more info about that... in the web.config:

...
    <configSections>
    <section name="sqlServerCatalogNameOverwrites" type="System.Configuration.NameValueSectionHandler" />
    
        ...
    </configSections>
    <appSettings/>
    
  <sqlServerCatalogNameOverwrites>
    <add key="caroma.devdorf" value="caromalive2012" />
  </sqlServerCatalogNameOverwrites>

  <connectionStrings>
    <clear/>
    <add name="Main.ConnectionString" connectionString="Persist Security Info=False;Integrated Security=SSPI;database=caromalive2012;server=.;Current Language=English;Connection Timeout=240;"/>
  </connectionStrings>
...
  1. Run the app. Everything works.

So, as I see, the problem could be one (or more) of these:

a. Something went wrong when you find-replace for the catalog on the generated code. Don't do that, instead use Catalog Name Overwrites (see point 4 above).

b. Maybe you are not using the correct LLBLGen project to generate code. I think that because of the missing ActionProcedures (see point 2). Please double check that.

c. Maybe it's the database. You didn't post your DDL script so I used a DDL generated from your LLBLGen project, but it may be that your actual DB has something wrong. Double check that you have the right LLBLGen Project and that you refreshed catalog from the real DB. I know you said that two DBs are the same, but after all these tests, it might be that they aren't.

Please try my exact steps using the LLBLGen project you posted and the repro solution you gave us, it should work.

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 14-Oct-2012 11:14:17   

so it can't connect to any other database

The catalog name (database name) is generated into the code. If you want to connect to another Database, please look at catalog name overwriting in the docs: http://www.llblgen.com/documentation/3.5/LLBLGen%20Pro%20RTF/hh_goto.htm#Using%20the%20generated%20code/gencode_applicationconfiguration.htm#catalognameoverwriting

That will allow you to connect to another database with the same code.

I have the feeling there's some miscommunication about what the problem is as we can't reproduce your problem but you obviously have a problem somewhere. Could you look into what David wrote above to see where we missed something so we can look at that and solve it for you? simple_smile

Frans Bouma | Lead developer LLBLGen Pro
mjeduar
User
Posts: 35
Joined: 14-Sep-2012
# Posted on: 17-Oct-2012 02:52:37   

What I did

  1. regenerate the database structure with the SQL DDL templates
  2. connected to this new db

Result

  • Without data I didn't get the error

  • With data I got again the error.

Maybe was for that reason you didn't get errors, so I attached a mini sql with structure and data.

With this script and the project I have before attached I got the error.

Could you check this.

Thank you for your support and patience

Attachments
Filename File size Added on Approval
delete3Test.sql 312,130 17-Oct-2012 06:34.05 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39859
Joined: 17-Aug-2003
# Posted on: 17-Oct-2012 17:24:39   

Sorry if I sound ignorant, I'm not, I'm just a bit lost at what the issue is, especially with your last post which states that the error pops up when data is present, which is odd.

In the startpost you state that this is the error you get: "[SqlException (0x80131904): The multi-part identifier "caromalive2012.dbo.Range.RangeId" could not be bound.]"

Is that the error you still get or not? As this error has nothing to do with whether there's data in the db or not.

Frans Bouma | Lead developer LLBLGen Pro
mjeduar
User
Posts: 35
Joined: 14-Sep-2012
# Posted on: 18-Oct-2012 00:10:48   

Yes confused

System.Data.SqlClient.SqlException: The multi-part identifier "caromalive2012.dbo.Range.RangeId" could not be bound.

Now I decided to generate the structure of the database with the templates(as you did before) because I thought may be is something related with the database.

So I did I generate the strucure of the database with the templates. Then I connected to this database and I didnt get the error. But when I put data I got the error again =>

caromalive2012.dbo.Range.RangeId could not be bound. 

For me it doesn't have any sense,

To replicate the error Is just connect the project with the database with data I posted before

Please: frowning

I ask you please help with this, I am sticking with this (Just try put the project that I posted before and the database with data that posted on octuber 17) and youll see the error.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Oct-2012 07:17:09   

mjeduar wrote:

I ask you please help with this, I am sticking with this (Just try put the project that I posted before and the database with data that posted on octuber 17) and youll see the error.

Sorry but I still can't reproduce it disappointed , even with your script. The steps are the same as my last post, except this time I created a totally new database named "caromalive2012" and run your script on it. I even put a dataGrid in the page and I can see your data. In case it helps, I'm attaching my code (based on yours), so you can try it against the database.

As I mentioned in my last post, I suspect you are working on a wrong DB version or a wrong code version (see the point (2) at my last post). This is very odd, buy It might be a detail you are missing simple_smile . Double check everything and follow my previous steps to see if that helps. Keep us informed.

David Elizondo | LLBLGen Support Team
mjeduar
User
Posts: 35
Joined: 14-Sep-2012
# Posted on: 18-Oct-2012 09:14:50   

Thank you very much for all you support.

I resolved the problem:

With the project given by "daelmo" I realized what the problem was.

Was the version of dll

SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll I was using 2.5.7.906 SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll I was using 2.5.7.1005

1  /  2