2,157 Posted Topics

Member Avatar for Mr.BunyRabit

You don't provide enough information about the tables, but it would be something like: [code]UPDATE Students SET Student_Level = (SELECT Level_ID FROM Level WHERE Level_Name = @TextboxLevel) WHERE FirstName = @firstName AND LastName = @lastName[/code] Some of the field I made up since I don't know what you call them …

Member Avatar for Mr.BunyRabit
0
126
Member Avatar for ydan87

I've have the code to several different generic sorts in C# over [URL="http://www.daniweb.com/software-development/csharp/code/351309"]here[/URL] with some relative timings.

Member Avatar for Momerath
0
453
Member Avatar for NewOrder

[QUOTE=NewOrder;1521838]i know how to serialize, but is it possible to send the serialized object over the net and make it be retrieved to the original state?[/QUOTE] Depends on what the List contains. Most likely you won't have issues.

Member Avatar for Momerath
0
151
Member Avatar for Arjun_Sarankulu
Member Avatar for Arjun_Sarankulu
0
123
Member Avatar for lil_miss_choc

Why are you dividing the factorial by 2 in line 23? Also, you don't reset the factorial value each time through the n loop, so in the i loop it remultiplies the values 1 through n-1 to the previous factorial.

Member Avatar for lil_miss_choc
0
231
Member Avatar for Arjun_Sarankulu

If you split on space you'll get 24 parts. I'll leave you with [URL="http://msdn.microsoft.com/en-us/library/ms131448.aspx"]this[/URL] link to understand why

Member Avatar for Arjun_Sarankulu
0
106
Member Avatar for leo88

[code]String original = "{1 2} 3"; String temp = original.Replace("{","").Replace("}",""); int pos = temp.LastIndexOf(' '); String first = temp.Substring(0, pos); String last = temp.Substring(pos+1);[/code]

Member Avatar for Momerath
0
182
Member Avatar for RogerInHawaii

I don't see that they expose anything that will give you this information (or any information about the rendered size).

Member Avatar for Momerath
0
106
Member Avatar for Jessurider

Lines 5-10: Convert.ToString on string variables doesn't do anything. Lines 20-28: These lines do nothing you can remove them. What makes you think the user name wasn't updated?

Member Avatar for abelLazm
0
137
Member Avatar for leo88

[code]Dictionary<String, Double> sortList1 = new Dictionary<String, Double>(sortlist2);[/code]

Member Avatar for leo88
0
382
Member Avatar for AndreRet
Member Avatar for leo88

This line[code]sortList4.Add(gk, value1[0]);[/code]is going to assign the same value to every entry in your list. Did you mean to say[code]sortList4.Add(gk, value1[c]);[/code]?

Member Avatar for leo88
0
141
Member Avatar for Jessurider

I don't see the constraint clause in your table creation. You'll also need to change the name of the constraint for each table.

Member Avatar for Jessurider
0
225
Member Avatar for qweret

[code]string loginUri = "http://www.somesite.com/login"; string username = "username"; string password = "password"; string reqString = "username=" + username + "&password=" + password; byte[] requestData = Encoding.UTF8.GetBytes (reqString); CookieContainer cc = new CookieContainer(); HttpWebRequest request = (HttpWebRequest)WebRequest.Create (loginUri); request.Proxy = null; request.CookieContainer = cc; request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength …

Member Avatar for Momerath
0
103
Member Avatar for easa0562

You have a problem with your InsertNode method. It can't insert right side nodes since there is no 'else' for the line 39. You need to go over your closing } characters as you are missing one at one point and have an extra one at another.

Member Avatar for Momerath
0
75
Member Avatar for frogboy77

1) Highlight the text you want to be a link. Click the button on top of the editor that looks like a planet with a piece of chain on it (a [I]link[/I] of chain). Enter the url and click ok. All done. If you want to do it by hand, …

Member Avatar for sania85
0
845
Member Avatar for rahulrajcse

No. The various data structures have different usages for which they are suited. No one structure is applicable to all situations.

Member Avatar for jwenting
-4
201
Member Avatar for Freedom*

[QUOTE=;][/QUOTE] Lines 5-9: You say they have to be private, but you declare them public.

Member Avatar for Freedom*
0
111
Member Avatar for Arjun_Sarankulu

And if you are only expecting one value you should use ExecuteScaler() not ExecuteReader().

Member Avatar for Arjun_Sarankulu
0
130
Member Avatar for Shaitan00

After setting [I]Deny logon locally[/I] did you set [I]Impersonate a client after authentication[/I]? It's what ASPNET does to prevent logging in, might work for you.

Member Avatar for Shaitan00
0
182
Member Avatar for bmason

Your database code is very messed up. Take a look at the example at the bottom of [URL="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.aspx"]this[/URL] page. You'll be doing 2 ExecuteNonQuery() calls instead of the ExecuteReader() code.

Member Avatar for Momerath
0
123
Member Avatar for paresh_thummar

Most likely SID is a string so you need to change your code to[code]ch1 = "select Sno from Student where SID = '" + @smemno.Text + "'";[/code] Notice the single tick marks ('). And there is no need to call ToString() on a text field.

Member Avatar for Momerath
0
85
Member Avatar for james6754

You could try [URL="http://shop.lego.com/Product/?p=8547"]Lego Mindstorms[/URL]. Still costs some money, but you can do more than just a roving webcam.

Member Avatar for Momerath
0
59
Member Avatar for leo88

[QUOTE=;][/QUOTE] There is nothing between the numbers to split on. If you know they are all just a single character, then you can do:[code]StringBuilder sb = new StringBuilder(); foreach (char c in ipt) { sb.AppendLine(c); } StoreRoom.Text = sb.ToString();[/code]

Member Avatar for Mitja Bonca
0
2K
Member Avatar for JeroenvDijk

I've had to fix a program where the author used variable names "Flag1", "Flag2", ... "Flag46" (and "Switch1", "Switch2", ... "Switch50"). But enough of coding horrors ... I disagree with some of the style you mention. Most styles I've run into use Pascal case for method names (first letter capitalized) …

Member Avatar for ddanbe
1
595
Member Avatar for zachattack05

System.Version cannot be inherited. But it already has the operators overloaded. Higher version numbers are greater than lower version numbers. Higher version numbers are newer, if you are doing it right.

Member Avatar for zachattack05
0
80
Member Avatar for narendera22

There are many ways to connect, I'd check out [URL="http://connectionstrings.com/ibm-db2"]connectionstrings.com[/URL]

Member Avatar for Mitja Bonca
0
116
Member Avatar for NOVICE3
Member Avatar for NOVICE3
0
113
Member Avatar for leo88

[code]Console.WriteLine("\t{0}:\t{1}", mySL.Keys[i], mySL.Values[i]);[/code]

Member Avatar for Momerath
0
117
Member Avatar for rajkumar0428

[code]private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { // Do whatever here e.Handled = true; }[/code]

Member Avatar for Momerath
0
194
Member Avatar for hypeh
Member Avatar for Usmaan

When you hit the X in the corner, the form closes, it doesn't exit the application. But the startup form is run from Program.cs which has this line [icode]Application.Run(new Form1());[/icode]. When the form closes, the line following this one is run, and there is nothing there so the application exits. …

Member Avatar for Usmaan
0
103
Member Avatar for draven07

[URL="http://www.microsoft.com/express/Downloads/#2010-Visual-CS"]Visual Studio Express Edition[/URL]

Member Avatar for lxXTaCoXxl
0
111
Member Avatar for shyla

It only asks for one default argument, and wants you to call the method twice in your main code, once with just a movie name and once with a name and minutes.

Member Avatar for shyla
0
99
Member Avatar for techturtle

You can do it in the form.designer.cs file, along with all the other attributes that are set there in the InitializeComponent method.

Member Avatar for techturtle
0
407
Member Avatar for CJdamaster

Use your second struct to hold the data. And you are trying to use VB syntax to declare an array. Use: [code]downloadInfo[] downloadlist = new downloadInfo[size];[/code] where size is the size of the array. If you want a variable size data structure, use List<T>:[code]List<downloadInfo> downloadlist = new List<downloadInfo>();[/code]

Member Avatar for CJdamaster
0
103
Member Avatar for josephP

You don't reset your counts when you enter a new plate. Move lines 5-8 to right inside the do loop. Your if statement in line 27 needs some work, as does the else part.

Member Avatar for Momerath
0
118
Member Avatar for shyla

No, you should only have one parameter, credit. Get rid of the limit parameter. Otherwise you did the default value fine.

Member Avatar for Momerath
0
79
Member Avatar for shyla

Line 65 and 66: [code]Console.WriteLine("The average is {0}", avg); Console.WriteLine("The sum is {0}", sum);[/code]

Member Avatar for shyla
0
88
Member Avatar for Despairy

You could speed it up a bit by checking if 2 is a divisor, then if not go into a loop starting at 3 and incrementing by 2. There is also no need to check if the divisor is prime as the first divisor you find will always be prime. …

Member Avatar for Despairy
0
1K
Member Avatar for xGrimReaperx

Oddly enough, I'm not going to watch the video, figure out what they are doing and then solve your problem. Post your code, point out the problem you are having and where it occurs.

Member Avatar for xGrimReaperx
0
103
Member Avatar for ajinkya112

Are you using the connection the entire time? What is the database connection timeout set to on both the client and the server? What code are you using to access the database? Do you check the connection to see if it is open before you use it?

Member Avatar for abelLazm
0
172
Member Avatar for bhagawatshinde

[code]namespace WindowsFormsApplication1 { public partial class Form1 : Form { private Boolean hasScroll = false; public Form1() { InitializeComponent(); } private void richTextBox1_ClientSizeChanged(object sender, EventArgs e) { hasScroll = !hasScroll; } } }[/code] The field [B]hasScroll[/B] will be true when there is a scrollbar, false otherwise. Make sure you attach …

Member Avatar for bhagawatshinde
0
1K
Member Avatar for krii017

You SQL statement has no parameters, yet you add two to them. Your reader returns every single userid/password in the database, yet you only read the first entry. Readers are usually in while loops. You can fix this by using [icode]SELECT COUNT(*) FROM user1 WHERE username = @username AND password …

Member Avatar for krii017
0
160
Member Avatar for josephP

[code]int[] iArray = new int[5]; for (int i = 0; i < iArray.Length; ++i) { Console.Write("\nEnter a value: "); iArray[i] = int.Parse(Console.ReadLine()); } Console.WriteLine("Maximum value is {0}", iArray.Max()); Console.WriteLine("Minimum value is {0}", iArray.Min());[/code] If you need to do it the way you are, just set iLrgest to Int32.MinValue, and compare …

Member Avatar for josephP
0
94
Member Avatar for lxXTaCoXxl
Member Avatar for prutudom

Without seeing any code how could we possibly know what is causing the issue? Post the code where the problem is happening.

Member Avatar for prutudom
0
745
Member Avatar for toadzky

[code]Type t = asm.GetType("cGame");[/code] You need the full name here [code]Type t = asm.GetType("namespace.cGame");[/code]

Member Avatar for toadzky
0
208
Member Avatar for shyla

The first line is "Create a console-based application". Are you sure you need a GUI-based application?

Member Avatar for shyla
0
700
Member Avatar for lxXTaCoXxl

It looks like your code it taking longer to run than a tick event, so it just gets set back each loop. Try something like this: [code] Color c = label1.ForeColor; int colorRed = c.R; int colorGreen = c.G; int colorBlue = c.B; colorRed++; colorGreen++; colorBlue++; if (colorGreen == 192) …

Member Avatar for lxXTaCoXxl
0
144

The End.