Search Results

Search found 1372 results on 55 pages for 'userid'.

Page 39/55 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Database designing for a bug tracking system in SQL

    - by Yasser
    I am an ASP.NET developer and I really dont do such of database stuff. But for my open source project on Codeplex I am required to setup a database schema for the project. So reading from here and there I have managed to do the following. As being new to database schema designing, I wanted some one else who has a better idea on this topic to help me identify any issues with this design. Most of the relationships are self explanatory I think, but still I will jot each one down. The two keys between UserProfile and Issues are for relationships between UserId and IssueCreatedBy and IssueClosedBy Thanks

    Read the article

  • Help with complex sql query

    - by eugeneK
    To make story short, i'm building self-learning banner management system. Users will be able to insert these banners to their site when banners will be shown based on sales/impressions ratio. I have 4 tables Banners bannerID int bannerImage varchar.... SmartBanners smartBannerID int smartBannerArrayID int bannerID int impressionsCount int visibility tinyint (percents) SmartBannerArrays smartBannerArrayID int userID int Statistics bannerID int saleAmountPerDay decimal... Each night i need to generate new "visibility" for each SmartBanner based on whole SmartBannerArray that same user has. So i need to get sum of impressions and sales for each bannerID in SmartBannerArray. All comes to my mind is to use double cursor, one will loop thought SmartBannerArrays get needed values for sum of impressions and sales and then inner loop which will access each SmartBanner and change it's "visibility" percentage based on (sales/impressions)/(sumOfSales/sumOfImpressions)*100 Hope you get the picture... Is there any other way to design better tables or not to use double cursor to avoid server overload ?

    Read the article

  • Compiled Linq Queries with Built-in SQL functions

    - by Brandi
    I have a query that I am executing in C# that is taking way too much time: string Query = "SELECT COUNT(HISTORYID) FROM HISTORY WHERE YEAR(CREATEDATE) = YEAR(GETDATE()) "; Query += "AND MONTH(CREATEDATE) = MONTH(GETDATE()) AND DAY(CREATEDATE) = DAY(GETDATE()) AND USERID = '" + EmployeeID + "' "; Query += "AND TYPE = '5'"; I then use SqlCommand Command = new SqlCommand(Query, Connection) and SqlDataReader Reader = Command.ExecuteReader() to read in the data. This is taking over a minute to execute from C#, but is much quicker in SSMS. I see from google searching you can do something with CompiledQuery, but I'm confused whether I can still use the built in SQL functions YEAR, MONTH, DAY, and GETDATE. If anyone can show me an example of how to create and call a compiled query using the built in functions, I will be very grateful! Thanks in advance.

    Read the article

  • Using Multiple Foreign Keys to the same table in LINQ

    - by Graeme
    I have a table Users and a table Items In the Items table, I have fields such as ModifiedBy CreatedBy AssignedTo which all have a userId integer. The database is set up to have these as foreign keys back to the Users table. When using LINQToSQL, the relationships which are automatically built from the dbml end up giving me names like User, User1 and User2 e.g. myItem.User1.Name or myItem.User2.Name Obviously this isn't very readable and I'd like it be along the lines of myItem.CreatedByUser.Name or myItem.ModifiedByUser.Name etc I could change the names of the relationships but that means I have to redo that every time I change the db schema and refresh the dbml. Is there any way round this?

    Read the article

  • Can i lock a record from a join sql statment using ROWLOCK,UPDLOCK ?

    - by Andrea.Ko
    I have a store procedure to get the data i want: SELECT a.SONum, a.Seq1, a.SptNum, a.Qty1, a.SalUniPriP, a.PayNum, a.InvNum, a.BLNum, c.ETD, c.ShpNum, f.IssBan FROM OrdD a JOIN OrdH b ON a.SONum = b.SONum LEFT JOIN Invh c ON a.InvNum = c.InvNum LEFT JOIN cus d ON b.CusCod = d.CusCod LEFT JOIN BL e ON a.BLNum = e.BLNum LEFT JOIN PayMasH f ON f.PayNum = a.PayNum LEFT JOIN Shipment g ON g.ShpNum = c.ShpNum WHERE b.CusCod IN (SELECT CusCod FROM UsrInc WHERE UseID=@UserID and UseLev=@UserLvl) AND d.CusGrp = @CusGrp After i get those records into cursor, i used RowLock, UpdLock to lock all the related invoice number. SELECT InvNum FROM Invh WITH (ROWLOCK,UPDLOCK) WHERE InvNum = Can i issue locking on the table INVH at the point i select the table from a few table using join command? Any advice, please!

    Read the article

  • ASP.NET MVC authorization & permission to use model classes

    - by Tomek
    Hi, This is my first post here, so hello :) Okey, let's get to the point... I am writing my first app in ASP.NET MVC Framework and i have a problem with checking privileges to use instances of model classes (read, edit). Sample code looks like this: // Controller action [CustomAuthorize(Roles="Editor, Admin")] public ActionResult Stats(int id) { User user = userRepository.GetUser(id); if (user == null || !user.Activated || user.Removed) return View("NotFound"); else if (!user.IsCurrentSessionUserOwned) return View("NotAuthorized"); return View(user); } So far authorize attribute protects only controller actions, so my question is: how to make (custom) authorize attribute to check not only user role, usernames but also did i.e. resources instantiated in action methods (above: User class, but there are other ORM objects like News, Photos etc.) All of these object to check have their unique ID's, so user have own ID, News have their ID and UserID field referecned to Users table (i mean these objects are LINQ2SQL classes). How should i resolve that problem?

    Read the article

  • Restarting service from a client computer without rights

    - by Jason
    I have already created the program to restart a SQL database but it only works if the client has the rights. This is going to be done on a local network from a client computer when they can't get a person that has the password on the phone. Any thoughts I'm currently using the servicecontroller to start and stop database. When I don't have the rights I get a access denied error, or This operation might require other privileges. Not sure if impersonation would work since I don't have the userid and password.

    Read the article

  • Can Log4net have multiple appenders write to the same file?

    - by adam0101
    I'm using a RollingFileAppender to log some info to a file with a conversionPattern (in the web.config) that looks like this for the header of each log section: <conversionPattern value="%date - %property{userId} - %property{method}%newline--------------------------------%newline%message%newline%newline"/> I'd like to log details under this header as bullet points. I'm currently trying to use another RollingFileAppender that logs to the same file with a simple conversionPattern of just a dash, like this: <conversionPattern value="- %message%newline"/> But these messages aren't making it into the log file. I'm using Log.Info() for the header and Log.Debug() for the bullet points and filtering each appender on their respective log levels. Is what I'm trying to do possible? Or is there a better way to get header and detail information into a log file from log4net?

    Read the article

  • nested linq-to-sql queries

    - by ile
    var result = ( from contact in db.Contacts join user in db.Users on contact.CreatedByUserID equals user.UserID orderby contact.ContactID descending select new ContactListView { ContactID = contact.ContactID, FirstName = contact.FirstName, LastName = contact.LastName, Company = (from field in contact.XmlFields.Descendants("Company") select field.Value).SingleOrDefault().ToString() }).Take(10); Here I described how my database tables look like. So, contacts table has one field that is xml type. In that field is stored Company filename and I need to read it. I tried it using this way: Company = (from field in contact.XmlFields.Descendants("Company") select field.Value).SingleOrDefault().ToString() }).Take(10); but I get following error: Member access 'System.String Value' of 'System.Xml.Linq.XElement' not legal on type 'System.Collections.Generic.IEnumerable`1[System.Xml.Linq.XElement]. Any solution for this? Thanks in advance, Ile

    Read the article

  • Problem in getting Http Response in crome

    - by Bhaskasr
    hi Am trying to get http response from php web service in javascript , but am getting null in firefox and crome. plz tell me where am doing mistake here is my code, function fetch_details() { if (window.XMLHttpRequest) { xhttp=new XMLHttpRequest() alert("first"); } else { xhttp=new ActiveXObject("Microsoft.XMLHTTP") alert("sec"); } alert("hi."); xhttp.open("GET","http://122.166.97.94:8080/proxim_live/phpsend.php?UserID=881&DeviceID=Imm123&LastSyncDate=",false); xhttp.send(""); xmlDoc=xhttp.responseXML; alert(xmlDoc); alert(xmlDoc.getElementsByTagName("Inbox")[0].childNodes[0].nodeValue); }

    Read the article

  • Authenticating wcf service

    - by Muhammad Jamal Shaikh
    hi , i want to implement a web service which is both in java and .net.but i will first create a wcf service and later convert the code to java . for securing the webservice , i have this in my mind. i shall be implementing asp.net form authentication type of stuff . i intent to sent a token to the client on providing valid userID and password to the login method. in return i would send a token. on all other service operations i shall check the token . Now i have a wcf client and a wcf service . what should be the shortest way forward ?should i use soap auth header to send the user ID and password and how should the token be transported ( in which field ? http or soap's ?) . P.S: of course i shall enable ssl later.

    Read the article

  • SSRS 2008 Snapshotting Security

    - by Holy Christ
    Hi, I'm writing a report that will show data based on the User!UserID built into the SSRS infrastructure. The data is sensitive to the user's department. In addition to these department users, there will be admins that should be able to run for all departments, or have a report parameter to run for a specific department. Ideally, I'd like to use SSRS snapshotting so that users can rerun a report they ran on a previous date. It's important that a user can only view the snapshots he created for his department. My questions are: 1.) Does SSRS snapshotting provide a mechanism to limit viewing snapshots by the user that created them? 2.) Will I need to write two reports, one for the admin and one for the department users? I think I do since there isn't a way to secure report parameters. Thanks!

    Read the article

  • Can access maven repository from behind proxy, need help.

    - by Digambar Daund
    I am trying to access maven repository from behind proxy. I configured settings.xml correctly (i guess so...) true http username password 12.34.56.78 8080 But still I am error message like... if i dont configure userid/password gets correct error message which is HTTP response code 407 - saying authentication required. But If I configure correct/incorrect proxy authentication it always prints below error message.... Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error trans ferring file: Server redirected too many times (20) Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom [WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Error trans ferring file: Server redirected too many times (20) [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR

    Read the article

  • Should I trust Redis for data integrity?

    - by Jiaji
    In my current project, I have PostgreSQL as my master DB, and Redis as kind of a slave, e.g., when some user adds another as a friend, first the relationship will be stored in PostgreSQL and then a friend list in Redis will be updated. When some user's friend list is requested, it will be pulled out of Redis instead of PostgreSQL. The question is: when I update the friend list in Redis, should I get a fresh copy outof PostgreSQL, and replace the old list in Redis with the new one or should I keep the old list and simply SADD the userid into the list? The latter is of course best for performance, but intuitively the former does a better job in keep the data integrity? And if something like Celery is used, is the second method worth the risk?

    Read the article

  • Setting multiple datasource for a report in Asp.net

    - by Nandini
    Hi all, I have a report whose data is derived from two stored procedures.so i need to set these two datasources for generating the report.But the reports which have only one SP, ie.only one datasource works properly. For setting the datasource, i wrote code like this: dim reportdocument as ReportDocument Dim reportPath As String = Server.MapPath("CrystalRpts\Report.rpt") ReportDocument.Load(reportPath) 'Function for Setting the Connection SetDBLogonForReport(MyConnectionInfo, ReportDocument) dim dt1 as datatable=Datasource1 dim dt2 as datatable=Datasource2 dt1.merge(dt2) reportdocument.setDataSource(dt1) CrystalReportViewer.ReportSource=reportdocument But, the report is not generating.it shows the following error The Report requires additional information Servername:- Server Database:- Database UserID:- Password:- But the reports which have only one SP, ie.only one datasource works properly.What colud be reason for this error?

    Read the article

  • How to parse json with fromJson method

    - by Ankit HTech
    I want to parse my json by fromJson class but I am unable to understand what should be the structure of my class if my json is like below: String json = "{"Result":{"Status":"SUCCESS","Message":""},"Response":{"Token":"ca0d7507-3907-4eed-af19-ad256bc71088","ZoneUrl":"https:\/\/qa.tritononline.com\/","CustomerID":1,"UserID":29,"DefaultLanguageID":1,"ZoneID":1,"IsTritonIntegrated":false,"Language":[{"LanguageId":1,"Language":"English","IsSelected":false}]}}" This is what I want to do Response res = new Response(); Gson gson = new Gson(); res = gson.fromJson(json, Response.class); I want to know what all variable should I take in Response class.

    Read the article

  • Handling log-in / log-out via Objective-c

    - by squeezemylime
    Having a real problem with this one...Tried using cookies to store variables, etc. but no luck. Writing an iPhone app where the User has to log in. There is an HTTPS call to get the person's userid, which is used practically everywhere else in the app, so that either has to be stored in a global variable or a cookie (for sending messages to other users, etc.) I tried the cookie route, but am having great difficulty storing (and retriving) a user ID in a cookie. The User should be able to then close out of the app and then reboot it and have the app retain their User ID as well, so I'm not sure global variables are necessarily the solution to this. Are there any best practices or suggestions?

    Read the article

  • Hibernate -using Table per subclass - how to link an existing superclass object to a sibclass object

    - by Chandni
    Hi, I have a User hibernate class, Clerk class and Consumer class. All these maps to their own tables in database. The User PK also acts as Clerk's and Consumer's PK. So now my problem is that if a user is initially a Clerk, he has a record in Users table and Clerks table. If that user wants to become a consumer, I want to link that User's record to the new Consumer's record. So even if I pass the userId to the consumer's record, it treats it as a new User to be persisted and gives a duplicate_key exception. How do I tell Hiernate to link the same user object with this new Consumer object. Thanks in advance, -Chandni

    Read the article

  • How to manipulate data in View using Asp.Net Mvc RC 2?

    - by Picflight
    I have a table [Users] with the following columns: INT SmallDateTime Bit Bit [UserId], [BirthDate], [Gender], [Active] Gender and Active are Bit that hold either 0 or 1. I am displaying this data in a table on my View. For the Gender I want to display 'Male' or 'Female', how and where do I manipulate the 1's and 0's? Is it done in the repository where I fetch the data or in the View? For the Active column I want to show a checkBox that will AutoPostBack on selection change and update the Active filed in the Database. How is this done without Ajax or jQuery?

    Read the article

  • Use ASP.NET Profile or not?

    - by DotnetDude
    I need to store a few attributes of an authenticated user (I am using Membership API) and I need to make a choice between using Profiles or adding a new table with UserId as the PK. It appears that using Profiles is quick and needs less work upfront. However, I see the following downsides: The profile values are squished into a single ntext column. At some point in the future, I will have SQL scripts that may update user's attributes. Querying a ntext column and trying to update a value sounds a little buggy to me. If I choose to add a new user specific property and would like to assign a default for all the existing users, would it be possible? My first impression has been that using profiles may cause maintainance headaches in the long run. Thoughts?

    Read the article

  • ASP .net Dropdown list not saving the selected value to database

    - by user326010
    Hi In the following code i want to save the value selected by user from drop downlist into database. but whatever value is selected by user, first value of dropdown lsit is saved to database View <% =Html.DropDownList("lstUsertype", (SelectList)ViewData["UserTypeID"])%> Controller public ActionResult CreateUser() { UmUser _UmUser = new UmUser(); UMRepository _UMRepository = new UMRepository(); EvoLetDataContext db = new EvoLetDataContext(); ViewData["UserTypeID"] = new SelectList(_UMRepository.FillUserTypes(), "UserTypeID", "UserType",2); return View(_UmUser); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult CreateUser(UmUser _umUser) { //try //{ if (ModelState.IsValid) { //try //{ UserRepository _UserRepository = new UserRepository(); _UserRepository.Add(_umUser); _UserRepository.Save(); return RedirectToAction("Details", new { id = _umUser.UserID }); /*} catch { ModelState.AddModelErrors(_umUser.GetRuleViolations()); }*/ } return View(); //} /*catch { return View(); }*/ }

    Read the article

  • Any way using JavaScript API via iOS? and problem with FQL queries responses.

    - by Assaf b
    Hi, I'm developing an iPhone application with FB connect, the JavaScript API includes really powerful methods like wait.on for combining requests... Any way using those API methods via iOS and Xcode? about the FQL responses, I'm using both: request:didReceiveResponse: AND request:didLoad: methods. all the FQL queries I send provoke didReceiveResponse but not all of them provoke the second one (didLoad). @"SELECT uid,eid FROM event_member WHERE uid in (select uid2 from friend where uid1=%d limit 100)", userID when the limit is 1-2 it provokes them all, when it grows too 100 (friends to fetch) it provokes only the first.. does anyone know this problem? Thanks!

    Read the article

  • asp.net webservice user management across pages

    - by nakori
    I'm developing a site that will display confidential readonly information, with data fetched from a WCF service. My question: What is the best approach to user management across different information pages. The service returns a collection with customer info after a secure login. My idea is to have a Customer object class that is stored in session. Is it possible to use things like HttpContext.Current.User.Identity.IsAuthenticated followed by HttpContext.Current.Session["UserId"] without using a database with role-based security? Would I be better off with a combination of local database, Linq to SQL or datasets rather than using just class objects for data fetched from service? thanks, nakori

    Read the article

  • Facebook - using an external flash application to connect via PHP

    - by Anonymous
    So, I have this application that needs to connect to facebook. It uses php for all of its data access, in older examples of the facebook API, i see people get the UID, and sessionkey from the iframe page, then send them to php and run a function called $facebook-setUser($UID, $sessionKey). This is how the majority of the tutorials online are doing it. That would be great, except the newest facebook API doesn't have any function like that. I have been scouring the web for 2 hours and have found nothing relating to the disappearance of this seemingly critical function. So, I have a flash application that needs to authenticate via a stateless php resource. I would love it if my PHP code could be completely uncaring if the request originated from flash, or iphone, or another application altogether-it should just need userId and and sessionKey. Is this still possible? Thank you in advance for your help! :)

    Read the article

  • Simulating a cookie-enabled browser in PHP

    - by Itamar Benzaken
    How can I open a web-page and receive its cookies using PHP? The motivation: I am trying to use feed43 to create an RSS feed from the non-RSS-enabled HighLearn website (remote learning website). I found the web-page that contains the feed contents I need to parse, however, it requires to login first. Luckily, logging in can be done via a GET request so it's as easy as fopen()ing "http://highlearn.website/login_page.asp?userID=foo&password=bar" for example. But I still need to get the cookies generated when I logged in, pass the cookies to the real client (using setcookie() maybe?) and then redirect.

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >