Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by DaNuGai

  1. DaNuGai

    Access to SQL

    Found a solution :-D SELECT CASE WHEN RolesByUser.RoleId Is Null THEN 'N' ELSE 'Y' END AS isUserInRole, Roles.RoleId, Roles.RoleNameFROM Roles LEFT JOIN (SELECT UsersInRoles.RoleId FROM UsersInRoles WHERE UsersInRoles.UserId=@UserId) AS RolesByUser ON Roles.RoleId = RolesByUser.RoleId
  2. DaNuGai

    Access to SQL

    I have a couple of queries in Access database that does exactly what I want. However, I want to convert this into an SQL Query but I'm not quite sure how I can go about doing that.Here is my First Ruery RolesByUser where UserId is provided dynamically through a parameter @UserId SELECT UsersInRoles.RoleIdFROM UsersInRolesWHERE UsersInRoles.UserId=[Enter UserId]; Here is Second Query that uses the query above: SELECT IIf(RolesByUser.RoleId Is Null,"N","Y") AS isUserInRole, Roles.RoleId, Roles.RoleNameFROM Roles LEFT JOIN RolesByUser ON Roles.RoleId = RolesByUser.RoleId; The result would look similar to a sample below (minus "..."):isUserInRole.....RoleId.....RoleName=======================Y.....................1............SupervisorN.....................2............ManagerThanks in advance
  3. DaNuGai

    FireFox Select

    I have reset the margin and padding in my CSS for all pages. * {margin: 0; padding: 0;} So for the dropdownlist, I decided to set the height in the style but that doesn't seem to work in FireFox. Is there a way to not reset the dropdownlist for all pages? In other words, what css elements can I use to set the dropdownlist to the way it used to look?Thanks in advance.
  4. Suppose I have an authentication ticket with timeout="30" & slidingExpiration="true" and I also have <sessionState timeout="30" /> under web.config.Now, correct me if I am wrong but both of them should expire at the same time if a user becomes idle after logging in, correct? So what happens when a user is logged and he/she is not idle? How and when does sliding expiration kicks in?Thanks in advance.
  5. It's tough to understand your question. Can you explain it in detail?
  6. DaNuGai

    Https Aspx Swf

    I have few flash (swf) files that are on a secured web application. Now each time a user visits this page, they get a message saying "This page contains both secure and non secure items". Is there a way to get rid of this message? Also, is there a way to secure swf files so they don't get downloaded to the user's temp folder?The whole idea is to secure the swf files but at the same time allow a small group of users to view them online. Is this even possible?Thanks in advance.
  7. Yeah I found that website when I googled SQL Triggers but I don't know what I was doing wrong but I wasn't able to replicate what I had listed above.Thanks for your help though.
  8. I've used the code below for a MySQL database and it worked fine. However, now I am using an SQL 2005 database and I am trying to replicate the code below but I am having trouble converting the triggers. I understand that I can't use TIMESTAMP and instead I have to go with DATETIME data type but how do you write the same trigger for SQL 2005 database so it functions similar to the way it did in MySQL database.Thanks in advance. CREATE TABLE EVENT ( EventID INT UNSIGNED NOT NULL AUTO_INCREMENT, DateFrom DATE NOT NULL, DateTo DATE NOT NULL, EventTitle VARCHAR(50) NOT NULL, Event TEXT NOT NULL, Created TIMESTAMP DEFAULT '0000-00-00 00:00:00', Updated TIMESTAMP DEFAULT '0000-00-00 00:00:00', PRIMARY KEY(EventID));CREATE TRIGGER EVENT_TIME_CREATED BEFORE INSERT ON EVENT FOR EACH ROW SET NEW.Created = NOW(), NEW.Updated = '0000-00-00 00:00:00';CREATE TRIGGER EVENT_TIME_UPDATED BEFORE UPDATE ON EVENT FOR EACH ROW SET NEW.Updated = NOW(), NEW.Created = OLD.Created;
  9. Thanks for your reply but it doesn't work. I've tried the following strings and they all failed: I want a regular expression where the top two fails and rest of them should pass
  10. I am using the following regular expression ^([01]?[0-9]|2[0-3])(:([0-5][0-9]))$ It works fine. However, I just want to exclude the following matches Does anyone know how? Thanks in advance.
  11. Thank you so much JustSomeGuy I appreciate your help.
  12. That's what I thought too but I am getting the same results on the following website as well...Validator
  13. Thanks for your quick reply.I don't mean to be a pain but I am using the following site to test out the regular expressions and I am not getting the same results.Regular Expression Validator
  14. Thanks for your reply. By the way, the regular expression you gave me doesn't seem to work properly.If the first string is longer than 8 characters, it still returns true.Also, I am only want to use alpha characters (no Numberic and no Special characters). I tried something like ([A-Za-z]){1,8}\\([A-Za-z])+ and it doesnt' work as well.Thanks again for your help. I appreciate it.
  15. I am looking for a regular expression for "Domain\UserName"...so essentially string "Text1\Text2" should return as valid. Minor condition is "text1" should have a max length of 8.Thanks.
  16. I am writing an application where I am using form authentication for security purposes. I have written a method where the application goes to SQL server to authentication users. However, here is the dilemma, I am requiring multiple username from a user and then password. (i.e. usrname1, usrname2, passwrd where usrname1 and usrname2 are primary key in the db)So my question is how can I pass multiple username using FormsAuthentication.RedirectFromLoginPage and how would i retrive multiple usernames when a person logs in.Any ideas, please help.
  17. DaNuGai

    Css Layout

    I am trying to achieve something like this...However, I can't seem to get the footer on the bottom and height="100%" nor can i get the vertial-align="middle"Any help will be greatly apprecaited...thx <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head> <title>Title</title> <style> * { border: none; padding: 0; margin: 0; z-index: 0; } html, body { height: 100%; } div { position: relative; } #wrapper { left: 50%; margin-left: -385px; width: 770px; height: 100%; } #header { width: 770px !important; height: 150px !important; background: url("images/header.png"); background-repeat: no-repeat; } #body { display: table-cell; width: 740px !important; min-height: 370px; padding-left: 15px; padding-right: 15px; background: #fff; vertical-align: middle; text-align: center; } #footer { color: #cccccc; width: 740px !important; height: 60px !important; padding-left: 15px; padding-right: 15px; padding-top: 15px; background: url("images/footer.png"); background-repeat: no-repeat; font-size: 7pt; text-align: center; } </style></head><body> <div id="wrapper"> <div id="header"> </div> <div id="body"> <span>I want everythig under ID="body" to be in the Center (horizontally) and in the middle vertically</span> </div> <div id="footer"> <span>© 2009 Blah Blah Blah</span> </div> </div></body></html>
  18. Thanks for the reply.I am not sure if you can do that in IIS 6.0...at least I couldn't find a way to do it.
  19. I have IIS 6.0 running on windows server 2003.I have a website running on port 80 and I just installed this application that runs on the same server but on a different port (8090). Now is there a way to create a virtual link in IIS that would allow me to link the application thats on a different port. In other words, I would like to enter http://<server-name>/Application as oppose to http://<server-name>:8090The problem is the application uses it's proprietary engine so I can't just create a virtual directory.Thanks in advance
  20. I was able to fix this issue by a using a popup as described above and transmit the info back to the original page. This took some load off the main window, which fixed the problem. It has been working fine under all browsers and OS except dail-up connect.I have some dial-up connection users that are saying only half of the SELECT drop down menu loads under the pop-up. I am not sure how I can fix this issue. Any help will be greatly appreciated.Thanks.
  21. Hello,I have a form in which I have a SELECT menu and under the SELECT menu I have (<OPTIONS>) list of all colleges in the United States. Now I ran into a problem yesterday, my form load properly and everything works fine in IE. However, only half of the form load in FireFox and I think its because I have such a big list under SELECT menu. I have this form under a JSP, which is very similar to ASP except JSP uses java.Anyways, I am trying to figure out if it's possible for me to remove SELECT menu and insert a read-only INPUT field, which will be filled automatically from another window. In other words, I will have a link next to the INPUT field, which will open a window with the list of colleges in the United States and upon selecting the college, the popup window will close and the INPUT field will be filled in automatically with the college code.Any help will be greatly appreciated. I have a pretty good feeling that this can be done using JavaScript but I am not sure how, so please help. I am somewhat familiar with XML, so if someone think it's easier to do this with XML, please let me know how.Thanks.
  22. DaNuGai


    I have a website where the Main table is aligned center, so my website looks has format smiliar to the following website: http://www.oswd.org/Now I want to insert a DIV tag and position it over an image and at a certain place on that image. Now depending on screen resolution the images aligns differently since it is centered but the DIV tag is position by pixels.I would really appreciate if someone can help me with this issue. I would like to be able to add a DIV tag on an image and position it relative to the image.
  23. DaNuGai


    Thanks for your help...I found some info that I figured I will share over here.1) http://www.googlestore.com/appliance/product.asp?catid=3 - Expensive2) http://www.google.com/enterprise/hosted_vs_appliance.html - Very Reasonable Price (if google host it)3) http://www.freefind.com/plans.html - Very Reasonable Price (Never hear of them before though)
  24. I tired that and it works with IE6 but not with FireFox or Windows Mobile IE
  25. DaNuGai


    Well...98% of my pages are static and I do update information on the website on daily bases, which is why I didn't think google would be a idea.Do you know of any program that can index my website and store information on daily bases and provide search functionality?
  • Create New...