Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sharp_k

@sharp_k
About
Posts
67
Topics
20
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Introduce integerity in the database
    S sharp_k

    Well this would be interesting if I can do what you mention. I can use it for other purposes and will be helpful to me. But in my situation, I can not make a combination of columns unique. Things are like 1. Customer are renewed so the data can be very similar to each other. 2. Some honest mistakes can occur where the same data is added twice. The user can figure it out but I want to stop it from the db end. I am thinking I should change an existing field unique or add a new field which would be unique.

    Database database question

  • Introduce integerity in the database
    S sharp_k

    I have a single table called customers that stores all customers information. It has only one primary id field, which is identity. At times it happens duplicate records are inserted. But since the primary ID is the different, the records are actually different. There is no other field in the table that I can make unique. What is the best way to introduce data integrity in the database so that duplicate records can not be inserted in the table. Note that table has more than 80 fields.

    Database database question

  • I am so glad to see the new QA format on CP
    S sharp_k

    Just landed on a question via google and found the Stack overflow style QA format. Really happy to see it and planning to use CodeProject (CP) once again.

    Site Bugs / Suggestions data-structures beta-testing question

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    This is great advice. The fact is I have not worked a great deal with roles, profils etc and I just getting to know what providers are. 1. I have about 30 total users (max) 2. I have about 10 roles 3. SQL Server 2005 4. yes 5. No, when any page is access that has IsUserInRole, it is very slow 6. I am not overriding any function but thinking about it now. Something to note, this application was change from time to time so it also has old users which are about the same in numbers but obviously as upgraded the program, we created new users and the old ones are still in the database.

    ASP.NET question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    Ok tried it. It did work but it also took 13 seconds to execute. Note that I have tracing enabled.

    ASP.NET question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    Is

    User.IsInRole

    faster and less expensive than

    Roles.IsUserInRole

    ASP.NET question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    I am checking if the user in in role, he is allowed access to the page. If he is not, he is shown the error message. I have not trie User.IsInRole, somewhere I read, it give different result.

    ASP.NET question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    What basically the logic is right now, every page check for IsUserInRole and not just for one role. There are pages which can be accessed by two or three roles. If the user is in that role, he is allowed access otherwise not. It does not seem like that wasteful. But since IsUserInRole is slow, it needs to be made better. Ever page you visit is slow just because of it! So I can see now if I use cache even for single user, at least all the subsequent clicks will be faster.

    The Lounge question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    I am using Page_load currently. The code came from previous developer. There is a lot of calling for IsUserInRole so that definitely can improve performance if I remove them. But I am looking for a more elegant solution now that solves the problem of slow IsUserInRole. If not, your suggestion would be my best bet.

    The Lounge question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    I dont have SQL profiler. But well made point. Will look into it. The total users in my app is less than 100 anyhow. Shouldn't be taking that long! Will investigate.

    The Lounge question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    Thanks. Did will delete this one.

    The Lounge question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    While debugging my slow application, I found the culprit is

    Roles.IsUserInRole

    It take from 3 sec to 9 second to execute. I found the reason it through the entire user list and calls other function, but it shouldn't be that slow to what I understand. My question is can it be made faster?

    ASP.NET question csharp asp-net

  • IsUserInRole too slow - ASP.NET
    S sharp_k

    While debugging my slow application, I found the culprit is

    Roles.IsUserInRole

    It take from 3 sec to 9 second to execute. I found the reason it through the entire user list and calls other function, but it shouldn't be that slow to what I understand. My question is can it be made faster?

    The Lounge question csharp asp-net

  • javascript : submit for via link + "retrieving value of submit button"
    S sharp_k

    I think I solved the problem. I introduced a hidden field that acts as a button which accomplishes the purpose.

    Web Development question javascript security testing beta-testing

  • javascript : submit for via link + "retrieving value of submit button"
    S sharp_k

    When you submit a form via javascript, (it is already done), the value of Submit button is not set. I want this to be set for security reason and as good programming practice. I tried something like this, that should work but it does not.

        document.hiddenform.school.value = 'My School';
    document.hiddenform.submitbutton.value = 'My Submit';
    
    document.hiddenform.submit() ;
    

    That is I am setting value of of submit button in javascript. While "My School" text is correctly assigned to the school text field, "My Submit" text is no assigned to submit button. Any one know what is the best way to go about it? I am using link to submit form and i want the submit button to be set as well. Well actually I might go without the submit button but just curious if anyone can help in this case, just for testing. Thanks

    Web Development question javascript security testing beta-testing

  • how to generates indexes for a query
    S sharp_k

    Lets say I run a query on a table and it returns the record with ids 2,4 and 6. My id is auto incremented number which is incremented automatically for each inserted record. I dont want to use these ids but rather want to generate my own index which starts for 0 or 1. In this case my indexes should be (1, 2, 3). How can i do it? Thanks in advance. Lets say my table name is 'students'

    SELECT * from students

    The above code returns the actual id's field which may not be consecutive. I want to generate my own indexes which are in ascending order 1, 2, 3 ...

    MySQL database question tutorial

  • How to print an a 4x4 array in clockwise direction
    S sharp_k

    Good to know a little bit about you. I actually looked at your webpage on codeproject but there was not much there except that you are from Italy :-O Well thanks for the little background. Codeproject is my resource for technical questions so I will definitely post here if i need any help. Thanks again.

    C / C++ / MFC tutorial data-structures help question

  • How to print an a 4x4 array in clockwise direction
    S sharp_k

    Thanks again! I appreciate it. I am definitely a fan of your programming skills. How much of experience do you have in programming btw. You have personnel contact? :)

    C / C++ / MFC tutorial data-structures help question

  • How to print an a 4x4 array in clockwise direction
    S sharp_k

    Thanks for explaining. I got the idea. This is a beautiful logic but it also requires some arithmetic and pointer skills :) If you could implement it in general arrow notation, that would be great. But of course not required :) You are absolutely right, the rotate array matrix approach would be too much waste of time and computationally expensive. I think this is great logic. I would not have seen it unless it was implemented. Thanks again. I greatly appreciate your help :) BTW Brave for implementing it in such a short amount of time!

    C / C++ / MFC tutorial data-structures help question

  • How to print an a 4x4 array in clockwise direction
    S sharp_k

    This works perfectly! I have not yet understood how it works though but will think on it. I was thinking on the idea to print the top row of the matrix then rotate the matric anticlockwise while removing the top row and printing the next top row and so on. But then I needed a function to rotate the matrix anticlockwise, which was not easy to implement when you consider you have to eliminate the top row as well. Your code is much simpler and very neat. I still have to understand it fully though. What do you think about my idea. Can you explain a little bit of your code. Thanks a lot for sharing :)

    C / C++ / MFC tutorial data-structures help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups