I am using LLB Gen Pro 1.0.2004 to do some database stuff in my ASp.NET web project. On my local machine, the database name is Xbert and When I deploy the application to a test server, the name of the database is XbertTest.
WHen I run my application on test server,
I get an error saying that "Server user 'xbert' is not a valid user in database 'Xbert'.." I am using XbertTest database not Xbert... as you can see in web..config file. Yes it is true that the name of the database is 'Xbert' on my local machine where I have generated the LLB GEN code.
In my web.config file, I define a property called,
<add key="Main.ConnectionString" value="user id=xbert;password=xxx;data source=xxx;initial catalog=XbertTest;" />
This is a sample code of mine that is throwing the error:
DataAccessAdapter adapter = new DataAccessAdapter(ConfigurationSettings.AppSettings["Main.ConnectionString"]);
IRelationPredicateBucket bucket = new RelationPredicateBucket();
//add PermissionDependence PermissionID relation
bucket.Relations.Add(PermissionDependenceEntity.Relations.PermissionEntityUsingPermissionId);
//add UserGroupPermission PermissionID relation
bucket.Relations.Add(PermissionEntity.Relations.UserGroupPermissionEntityUsingPermissionId);
//add MenuItem menuItemID relation
bucket.Relations.Add(PermissionDependenceEntity.Relations.MenuItemEntityUsingMenuItemId);
//where MenuItemID.FileName = @FileName
bucket.PredicateExpression.Add(PredicateFactory.CompareValue(MenuItemFieldIndex.FileName, ComparisonOperator.Equal, FileName));
//AND UsergroupPermission.UserGroupID IN
bucket.PredicateExpression.AddWithAnd(PredicateFactory.CompareRange(UserGroupPermissionFieldIndex.UserGroupId, ADUserGroupsArray));
EntityCollection obj = new EntityCollection(new PermissionDependenceEntityFactory());
adapter.FetchEntityCollection(obj, bucket);
Please help.