Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi all,
 
I have problem when run c# application on client machine. But that exception will not throw when run on visual studio 2010. When load data to table object exception was thrown at client machine.
 
I have used this code to select data:
 usra = (from usr in db.UserAs
                        where usr.UserName == uname &&
                        usr.UserPassword == password &&
                        usr.IsUserActive == true
                        select usr).FirstOrDefault();
UserAs -->table Object , uname and password are parameters
 
when run above code also run below code on db.designer.cs
 
public ObjectSet<usera> UserAs
        {           
            get
            {
                if ((_UserAs == null))
                {
                    _UserAs = base.CreateObjectSet<usera>("UserAs");
                }
                return _UserAs;
            }
        }
        private ObjectSet<usera> _UserAs;
 
at this point exception was thrown on client machine but not on visual studio 2010. All related software has installed on client machine.
 
backend ismssql 2005.
 
Please help me to solve this problem.
 
Thanks,
 
Chamara
Posted 7-May-12 20:47pm
Edited 8-May-12 6:38am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It would help when you add the exception message as well to your question. Now it is guessing. But there are things you can check.
If you are convinced it's not the software then it may be a database related problem.
 
Things I would check:
 
1) the connectionstring, is it the same?
2) did you copy the .config file as well to the client?
3) has the client access to the database?
 
I do not understand from your question where you run visual studio 2010. If it is not the same machine you can check for this as well:
 
1) is there a difference between OS versions? 32/64 bits
2) are the correct drivers installed 32/64 bits
 
I hope this helps you to find the problem.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 8 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100