Hi i come up with:
SqlConnection db = this.OpenDatabase();
SqlCommand cmd = new SqlCommand("INSERT INTO UserRoles (UserName, RoleName) VALUES (@UserId, @RoleId)", db);
cmd.Parameters.Add("@UserId", SqlDbType.Int);
cmd.Parameters.Add("@RoleId", SqlDbType.Int);
SqlTransaction tran = null;
try {...
Hi, i've downloaded a membership and roles provider but i am very new to ado.net. I have come from asp background. Here's my code:
public override void AddUsersToRoles(string[] usernames, string[] rolenames) {
// Validate arguments
foreach (string rolename in rolenames) if...
Hi, cheers for your reply i've spent the day reading up on profiles and they seem great. I have a couple of problems i just have to get my head around first. My site has a users area (which will use membership and roles - and hopefully profiles for the extra properties). This is where i...
Hi, i'm trying to implement my own custom membership provider. The problem i have is that my table i am storing my membership information has some additional fields such as the members address.
I found a tutorial on the internet which has the following
public override MembershipUser...
Hi i have a FormView control with a DropDownList in like so:
<asp:DropDownList ID="lstCategoryID" DataTextField="Text" DataValueField="Value" runat="server">
</asp:DropDownList>
And in the Page_Load event handler i have the following:
Dim lstCategoryID As DropDownList =...
Hi one small problem if i put last sunday 00:00:00 i get the timestamp for the previous sunday (6th August) instead of the timestamp for the current sunday. Any idea of a fix. Appreciate your help once more thanks.
Hi, is it possible to return the unix timestamp for the previous saturday at 12:00. I tried looking mktime but didn't know where to start. Appreciate if someone could help. Thanks
Hi I did a picture to explain http://www.fantasy-league-manager.com/flm.jpg. I thought it would help. You can get the css at http://www.fantasy-league-manager.com/includes/styles.css. Cheers
Hi, i have a renderring issue on my website:
http://www.fantasy-league-manager.com/privacy-statement-7.htm
in ie6. If you scroll to the bottom (keep scrolling up and down at the bottom to see the change) you will see that the bottom doesn't look right. In the past i've found that putting...
Hi, i've been reading up on transactions and how to use them. From what i see i simply put BEGIN at the start and then COMMIT at the end.
The reason i'm using transactions is because i don't want updates to take effect until every update has been made. Therefore i'm wondering whether the...
Hi, thanks for replaying. I had a try at normalizing but it's been along time since i last did it. I usually take it for granted these days. However i can't see how it's going to help with my problem since my initial database scheme seems well normalized. It's a case of making it simpler so i...
Hi, cheers for your help. I seem to be having this going good, however i've encountered one further problem when updating the player points. To update the points i run a script and it inserts in the team_players table. The trouble i'm having is that if the page fails executing half way...
Hi cheers for your suggestion guelphdad. I'm just thinking this one over. Here's an example (with your idea):
Say i have 100 teams with 10 players from each team (200 players in total to select from) this gives me 1000 records in the player_points table. If i update this every week then it...
Hi, i posted the other day about a problem i encountered when making a new site, trouble is i have another one. First here's my table structure:
players
- player_id (primary key)
- player_name
player_points
- player_id
- points
- date_created
teams
- team_id (primary key)
- team_name...
Hi on further testing i am now starting to get some funny results appear. I don't wish to total the points, i wish to join the players table with the latest added record in the player_points table with the same player_id's and then retrieve the player_name and corresponding points. Hope that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.