2,245 Posted Topics

Member Avatar for xander85

[QUOTE=Dumbledor;1222727]4 students just copied this code and lost all their points for the assignment.[/QUOTE] Out of curiosity... which school did this happen at?

Member Avatar for LoganJames
0
1K
Member Avatar for TotoTitus

Out of curiosity have you read the WCF/WPF Chatter codeproject article? [url]http://www.codeproject.com/KB/WCF/WCFWPFChat.aspx[/url] You could use WCF to generate proxy clients that will handle threading for you by applying attributes on the contract implementation. There is also a "workaround" for using shared assemblies (instead of proxies) and having .NET handle the …

Member Avatar for Diamonddrake
0
935
Member Avatar for xsach
Member Avatar for havejeet

You can also use the configuration file of the assembly to store the value for each local user on the machine which sounds like it would be the most fitting in this case. Add a property called "CheckedItems" as a string to your Settings.Settings file and wire up these events …

Member Avatar for kvprajapati
0
864
Member Avatar for coop123

To expand on adataposts answer: [code] private void button1_Click(object sender, EventArgs e) { int iYear; string sModel; if (!int.TryParse(textBox1.Text, out iYear)) { MessageBox.Show("The year must be numeric"); return; } if ((iYear < 1950) || (iYear > DateTime.Today.Year)) { MessageBox.Show("Invalid year, grandpa."); return; } sModel = textBox2.Text.Trim(); if (string.IsNullOrEmpty(sModel)) { MessageBox.Show("Model …

Member Avatar for coop123
0
116
Member Avatar for sakhi kul

SQL Server has a different type of GUID compared to what you would generate normally in C#. Take a look at this article: [url]http://sqlblogcasts.com/blogs/martinbell/archive/2009/05/25/GUID-Ordering-in-SQL-Server.aspx[/url] If you're using a GUID primary key identifiers in a heavily upserted table it may behoove you to read that article.

Member Avatar for sknake
0
101
Member Avatar for mikesowerbutts

You need to read about [icode]IDisposable[/icode]. You were leaking objects that implemented IDisposable and had unmanaged resources. When you call [icode]GC.Collect()[/icode] and unreferenced objects are detected with finalizers then the finalizer *should* be invoked but the object will not be destroyed until the finalizer has ran, pushing it back another …

Member Avatar for sknake
0
222
Member Avatar for mansoorhacker

I posted a code snippet some time ago that uses encrypted passwords: [url]http://www.daniweb.com/code/post969838.html[/url] MD5 is a checksum so you can't "reverse" the hash to arrive back at the original password. This is usually the preferred method of storing passwords. In my example I used reversible encryption.

Member Avatar for sknake
0
78
Member Avatar for KRichardson1127

Can you post the table structure? Here is an example of what may cause this: [code] select Cast((59670.0 / 100.0) as decimal(2,2)) [/code] Results in: [code] [COLOR="Red"]Msg 8115, Level 16, State 8, Line 1 Arithmetic overflow error converting numeric to data type numeric.[/COLOR] [/code] It appears you're using a number …

Member Avatar for sknake
0
92
Member Avatar for domingo

[B]>> the problem is that i cannot find have to fill the datacolumns with the value of the datareader.[/B] I don't understand what you're trying to do. If you are only using a single table then consider using a [icode]DataTable[/icode] over a DataSet. Regarding the data reader -- are you …

Member Avatar for domingo
0
179
Member Avatar for zachattack05

You could use a dictionary to index the controls. [code] using System; using System.Collections.Generic; using System.Windows.Forms; namespace daniweb { public partial class frmAutoPopulate : Form { Dictionary<Control, string> bindings; public frmAutoPopulate() { InitializeComponent(); } private void frmAutoPopulate_Load(object sender, EventArgs e) { bindings = new Dictionary<Control, string>(); bindings.Add(textBox1, "Name"); bindings.Add(textBox2, "Adddress"); …

Member Avatar for zachattack05
0
154
Member Avatar for PierlucSS

Why not create the search results in a database and cache the results for the life of the session? If your source data is updated then you can invalidate the current cache and regenerate it. I'm still not clear on what your problem is exactly though. Could you explain it …

Member Avatar for sknake
0
78
Member Avatar for judithSampathwa

Parsing string representations of dates can often lead to problems. [URL="http://msdn.microsoft.com/en-us/library/1k1skd40.aspx"]DateTime.Parse()[/URL]: [QUOTE] ... This method attempts to parse s completely and avoid throwing FormatException. It ignores unrecognized data if possible and fills in missing month, day, and year information with the current time. If s contains only a date and …

Member Avatar for sknake
0
481
Member Avatar for bausahab

[QUOTE=finito;1220962]Well The Insert Statement in SQL would look like Insert INTO TABLE1 (FIRST_NAME) VALUES ('" + textbox2.text + "') did you connect your database and fill your dataset?[/QUOTE] You should always use parameterized queries. An example of parameters with OleDb: [code] private void buttonUpload_Click(object sender, EventArgs e) { using (OleDbConnection …

Member Avatar for finito
0
152
Member Avatar for sbv

[B]>>Is there a SQL Server 2003???[/B] No. Please start new threads for new questions. You will find your questions get answered more often that way!

Member Avatar for sknake
1
228
Member Avatar for Isaaac

You can just use [icode]Process.Start()[/icode]: [code] private void button1_Click(object sender, EventArgs e) { using (System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo() { ErrorDialog = true, ErrorDialogParentHandle = this.Handle, UseShellExecute = true, FileName = @"http://www.apexsoftware.com" })) { }; } [/code]

Member Avatar for Isaaac
0
137
Member Avatar for ebiemami

I borrowed the steps from another forum: Ø Create an Uninstall.bat file containing: C:\WINDOWS\system32\MsiExec.exe /I{productcode} (Path depends of your Windows version, check where your system32 folder is located.. you can also use %systemroot%\System32\msiexec.exe) (You’ll find the productcode in Visual Studio.NET > Tab Properties in the setup project you’ve just created) …

Member Avatar for blindprogrammer
0
2K
Member Avatar for Cap'nKirk

Look at this line: [icode]for (int i = 0; i < photo.Count; ++ i)[/icode] It should likely be [icode]i++[/icode] as everything I can think of in the CLR uses 0-based indexes. In the code you provided your first iteration would start at "1" then end at (photo.Count+1) giving you an …

Member Avatar for Ketsuekiame
0
3K
Member Avatar for captainm

What I find easier, but by no means proper, is to load a numerical column associated with the belt rank. You can hide the column and when the user wants to sort on belt you would really sort (under the hood) on the numeric column. You have to jump through …

Member Avatar for captainm
0
1K
Member Avatar for DhCoder

Upload your solution. I don't have any idea what could cause this off hand but there is a lot of designer generated code in datasets. You need to find out where exactly the null reference is... and to do that you need to step through the dataset. Pop in to …

Member Avatar for rohand
0
150
Member Avatar for andy_1234

Great post apegram. I'm more of a concrete entities person but LINQ would probably be the better way to go for this task (and a lot less code!) You could also do it this way [code] [XmlRoot("employees")] public class EmployeeList : List<Employee> { public EmployeeList() { } } [XmlType(TypeName="employee")] public …

Member Avatar for andy_1234
0
373
Member Avatar for SkyGuy

It may be a long shot but the card could be bad. Next time this happens try powering down your computer and disconnecting power, then reconnect it. This may be what inadvertently fixed the issue when you installed a second NIC. I have had motherboard problems before that would only …

Member Avatar for sknake
0
153
Member Avatar for rizwanfpak

You can't use reverse DNS to determine a website visited. A single IP address can host multiple websites and may not have a reverse DNS entry. When you visit a website your browser resolves the IP address of the host in your address bar then sends a GET request with …

Member Avatar for rizwanfpak
-3
110
Member Avatar for Chammarox

Please post ASP.NET questions in the ASP.NET forum. You can make a call to [icode]Session.Abandon()[/icode] to terminate the current session. [url]http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.abandon.aspx[/url]

Member Avatar for paslanmaz
0
139
Member Avatar for judithSampathwa

Try this: [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace daniweb.dgv { public partial class frmCalendar : Form { private DataTable dt; public frmCalendar() { InitializeComponent(); } /// <summary> /// Gets simulatation data /// </summary> /// <returns></returns> private static DataTable …

Member Avatar for sknake
0
152
Member Avatar for fxm

Well I disagree. If you take a look at MSDN or experts exchange they both mark the response answering the OP. When that has been marked as the answer it also shows directly beneath the original question so you don't have to sift through other (possible unrelated) posts. Once you …

Member Avatar for WaltP
1
162
Member Avatar for johndoe444

If you have locate/slocate/mlocate installed you could [icode]locate httpd.conf; locate apache.conf[/icode]. You could also use [icode]find[/icode]: [code] find /etc -type f \( -iname httpd\.conf -o -iname apache\.conf \) [/code]

Member Avatar for griswolf
0
265
Member Avatar for loose10

Install the drivers for your network card. If you go to start -- control panel -- system -- hardware -- device manager you should see a yellow icon in the hardware. Thats likely your NIC.

Member Avatar for finito
0
83
Member Avatar for agent154

To require administrative rights you need to embed and application manifest file. You can do this by "File -- New -- ... -- Application Manifest File". This is the default manifest: [code=xml] <?xml version="1.0" encoding="utf-8"?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3"> <!-- …

Member Avatar for sknake
0
1K
Member Avatar for serkan sendur

[QUOTE=jephthah;913328]jesus shut up already. no one gives a flying shit that your best friends didnt get "featured."[/QUOTE] You could have expressed your jealousy in a number of other ways without cussing on the forum....

Member Avatar for jephthah
1
366
Member Avatar for ashukite

Update the field in your data source instead of the [icode].Text[/icode] value, or update both. Also in your save methods have it call something like [icode]buttonSave.Focus()[/icode]. I believe until a control loses focus (by default) it does not perform validation and update the underlying values in the databound source.

Member Avatar for tuntunbabu
0
144
Member Avatar for tonygarcia

You're killing me with the [URL="http://www.acronymfinder.com/"]acronyms[/URL] :P! You should at least say the full name once before dropping [icode]CEICW[/icode]. I have never heard of that until I read this thread. Anyway back to your question. When you click links inside of OWA does the page immediately fail or does it …

Member Avatar for tonygarcia
0
244
Member Avatar for kneiel

[code] a = b + c \ +d; printf("\n"); [/code] Technically those are all three "lines" but you're using the "\" to have the script interpret them as though they are one line. What you could do is match all of the 's, then exclude all of the lines with …

Member Avatar for cfajohnson
-1
889
Member Avatar for Slade

You can authenticate users from a database, INI file, text file, remote database, XML file, CSV file, or just about anything else you can come up with. I personally use a database and that is also what I advocate so I would stick with the concepts you use in your …

Member Avatar for kvprajapati
0
3K
Member Avatar for ddanbe

using [icode]Application.DoEvents();[/icode] is NOT a good idea. Use another thread or force screen updating (like the original code snippet) but don't process messages with [icode]DoEvents()[/icode] in the middle of a long-running code block.

Member Avatar for g2gayan
1
3K
Member Avatar for RobertQQ

[QUOTE=pasanindeewara;925194]Pasan Indeewara: The best available online helps are, [/QUOTE] I disagree. The best online forum for C# is daniweb. MSDN comes in a close second

Member Avatar for kvprajapati
0
253
Member Avatar for cgyrob

Post your code where you are executing commands to the server with the connection, command, datareader, etc. Also make sure to post your connection string. For testing I would shut connection pooling to the oracle server off. It sounds like connections are being hung up in the pool and causing …

Member Avatar for cgyrob
0
202
Member Avatar for ayush1440

Install [URL="http://www.wireshark.org/"]Wireshark[/URL] on one of the machines behind your PIX. During a period of network outage fire up Wireshark and monitor your traffic for about 3 minutes. While you're capturing the data with wireshark open 2 browser windows and try to hit 2 different websites. Don't go crazy and try …

Member Avatar for Hilary H
0
4K
Member Avatar for Potato.Head

This doesn't make much sense but let me try... Work the original string backwards: [code=c#] private void simpleButton1_Click(object sender, EventArgs e) { const string str = @"this- is; text, example for the forum"; char[] delims = new char[] { '-', ';', ',' }; //Handle the original string going backwards for …

Member Avatar for Geekitygeek
0
3K
Member Avatar for napkinbob

Post the code you are using along with the evaluated value of source and dest for [icode]File.Copy()[/icode]. I have a number of apps that copy from UNC paths and they work OK, except for when the remote machine goes down. Then it throws an [icode]IOException[/icode]. Does your code fail every …

Member Avatar for fatiza
0
749
Member Avatar for S2009

Here is the TSQL to back up a database, and you can use serkan's code for connection: [code=sql] BACKUP DATABASE [MyDatabase] TO DISK = 'C:\....\MyDatabase.bak' WITH INIT , NOUNLOAD , NAME = N'MyDatabase backup', NOSKIP , STATS = 10, NOFORMAT [/code] One important thing to note is this command is …

Member Avatar for Ivan_86
0
12K
Member Avatar for jephthah

I also know that Narue is from Georgia because of her hostname on IRC. I don't recall the exact host but I remember having a conversation with her about Atlanta. I think it was *.ga.comcast.com It just so happens that the location under Tomm Gunn's profile is ... Atlanta, Georgia. …

Member Avatar for jephthah
3
682
Member Avatar for meera nandhini

The currently selected value, or all values available in the dropdown? You would also need to post your database schema. You can't just write a query to stick data in to SQL Server without knowing where the data is going. Post the code you're using and indicate where you are …

Member Avatar for skmishra1986
0
42
Member Avatar for ashish81sharma

Can you duplicate this behavior in a sample project and upload it? You can upload files by hitting "Go Advanced" then "Manage Attachments" I have seen executables behave differently when run inside of the IDE versus outside but its pretty rare. If you disable the visual studio hosting process it …

Member Avatar for kvprajapati
0
428
Member Avatar for tjfitz68

Can you post the full code (with connection strings) where you are creating and opening your connection to the SQL Server? In my testing in the past the connection timeout in the connection string worked but wasn't exact. I believe I set it for 5 seconds and forced a connection …

Member Avatar for tjfitz68
0
744
Member Avatar for Sune

You can have packet loss with TCP or UDP. What is your goal here? To get UDP over SSH working, or to measure packet loss?

Member Avatar for zerofreedom
0
2K
Member Avatar for milosz

milosz: What happens when your code runs? I haven't tested it but it looks like it should run OK...

Member Avatar for kvprajapati
0
16K
Member Avatar for avirag

One other way: [code=csharp] private void button5_Click(object sender, EventArgs e) { pictureBox1.Image = null; } [/code]

Member Avatar for renjujpanicker
0
7K
Member Avatar for MatthewKeyzer

That is an SMTP client, not a server. You need to use SSL on your [icode]SmtpClient[/icode]. I think its called an X509 Certificate in the CLR.

Member Avatar for alanm123
0
154
Member Avatar for lewashby

If your install came pre-loaded with open office then what makes you think you are missing packages? You can use [icode]apt-get[/icode] to install packages and [icode]apt-cache[/icode] to search for them. For example: [code] sk:~# apt-cache search openoffice | grep ^openoffice openoffice.org - OpenOffice.org Office suite openoffice.org-base - OpenOffice.org office suite …

Member Avatar for JasonHippy
0
131

The End.