How to obtain User Id from ObjectScope or Database Object?

4 posts, 0 answers
  1. Huy
    Huy  avatar
    3 posts
    Member since:
    Oct 2008

    Posted 03 Aug 2009 Link to this post

    How do I go about obtaining the UserId used to open the database connection?

    I'm aware that we can use the ConnectionURL property of the Database object, and I am looking to obtain just the UserId information.

    Thank you in advance...
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 04 Aug 2009 Link to this post

    Hello Huy ,
    At the moment parsing the ConnectionURL is the only way.

    Kind regards,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Huy
    Huy  avatar
    3 posts
    Member since:
    Oct 2008

    Posted 04 Aug 2009 Link to this post

    If Integrated Security is used, Can UserId information still be obtained thru Telerik objects? or it has to be thru other means....

    I'm using SQL 2005, and in my tables I have "CreateBy" field to capture user who created the record. In SQL 2005, I setup default value for this field to "suser_sname()"; however, using Telerik OA doesn't trigger default values to be populated. I understand this is its limitation at the moment. Will this be resolved in the next release?

    Thank you.
  5. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 05 Aug 2009 Link to this post

    Hi Huy ,
    In .NET just use

    Environment

     

    .UserName;

     


    Regards,
    Jan Blessenohl
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top