Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Failure Fetching from Remote DB
 

Pages: 1
LLBLGen Pro Runtime Framework
Failure Fetching from Remote DB
Page:1/1 

  Print all messages in this thread  
Poster Message
DaveR
User



Location:

Joined on:
15-Jun-2004 16:37:10
Posted:
43 posts
# Posted on: 24-Nov-2005 18:02:13.  
We recently set up a SQL Server 2000 database on a remote server. We can connect to it with no problems using Query Analyzer and Enterprise Manager. However, LLBLGen SelfServicing objects fail to load.

It seems that LLBLGen can connect to the database and execute queries, but the query does not return results. For example:

Code:
try
{
e = new AccountEntity(1);
}
catch (Exception ex)
{
Debug.Write(exc.Message);
}
if (e.IsNew)
Debug.Write("Failed to load.");


This code executes without throwing an exception. Tracing into the LLBLGen code, the SqlConnection object is correct,as is the query. However, after the query runs, AccountEntityBase.EntityState.Fetched is false.

There is in fact a record in the database with PK=1, which can be verified by running a manual query.

What are the possible causes of this?
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37804 posts
# Posted on: 24-Nov-2005 18:48:13.  
Is your connection string in your llblgen pro app pointing to the right server?

Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
DaveR
User



Location:

Joined on:
15-Jun-2004 16:37:10
Posted:
43 posts
# Posted on: 24-Nov-2005 19:47:31.  
Yes, the connection string is correct. We set it using DbUtils.ActualConnectionString.

I tested using a bogus connection string, and as expected, it throws an exception.

So it seems as if LLBLGen can connect to the database, but for some reason, the query fails.
  Top
DaveR
User



Location:

Joined on:
15-Jun-2004 16:37:10
Posted:
43 posts
# Posted on: 24-Nov-2005 21:10:58.  
I think I found the problem.

The tables in the remote database are owned by a different user than "dbo". In fact, the same tables exist with the "dbo" owner but all these tables are empty (due to permissions issue).

I see that I can use schema name overwriting to rename 'dbo' using the .config file. I would prefer a way to do it using code, but I assume it is not possible...?


  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.