2,157 Posted Topics

Member Avatar for 99samsta

Normally you'd get a resource using [icode]myProject.Properties.Resources.<resourcename>[/icode]. Are you including the resource file in the executable? I'm not sure if the Express edition automatically uses the /resource compile option, you might need to use resgen.exe

Member Avatar for Momerath
0
305
Member Avatar for zachattack05

You wouldn't want to use a static lock with a non-static object. Remember that all objects of that type will be locked when one thread tries to access them.

Member Avatar for zachattack05
0
134
Member Avatar for vineeshvs
Member Avatar for Nony2007

Use [noparse][code] [/code][/noparse] tags. It makes it a lot easier to talk about your code when you can refer to line numbers and it actually has some formatting to it. And you have your loops wrong. There won't be any data to write they way you've set it up.

Member Avatar for Nony2007
0
1K
Member Avatar for axman1000

Have you tried using the SQL Server Data Transformation Services (DTS) Import Wizard or the SQL Server Import and Export Wizard? Not sure if they will let you select columns/rows but it's worth a try.

Member Avatar for Momerath
0
136
Member Avatar for Arjun_Sarankulu

You'll have to convert them: [code]int[] myInts = new int[number.Length]; for(int i = 0; i < number.Length; i++) { if (Int32.TryParse(number[i], out myInts[i]) == false) { // conversion failed, it wasn't an integer } }[/code]

Member Avatar for Arjun_Sarankulu
0
131
Member Avatar for kay21

Employee, patient, doctor and pharmacy all 'have an' address, so I'd just have an address ID in their tables linking to the address table. I would have admission -> treatment be a 1:M relationship, and History be a 1:M to admission. Prescription would be Treatment -> Prescription in a 1:M. …

Member Avatar for Momerath
0
123
Member Avatar for jayzee1989

imgSet is a 2D array and you are treating it like a 1D array in both lines 7 and 10.

Member Avatar for Momerath
0
236
Member Avatar for Zephyr-

It's a decimal, and you covert it by doing this [icode]int myInt = (int)myUpDown.Value;[/icode]. Note that if you allow values outside of the normal Int32 range the value you get will be wrong :)

Member Avatar for Momerath
0
199
Member Avatar for xxxtian

Depends on how much data is in the table. If you filter in your code, all the data has to be transferred from the server to your application. Not a big deal for 20 rows. It is a big deal for a million rows.

Member Avatar for Momerath
0
119
Member Avatar for server_crash

What you need to remember is that factors come in pairs and that you only need to check up to the square root of the number for factors to get them all (think about it a bit). So, you need to [code=text]Loop i from 1 to Square root of number …

Member Avatar for Momerath
0
162
Member Avatar for judithSampathwa

Old [URL="http://www.mssqlcity.com/Articles/Adm/SQL70Roles.htm"]tutorial[/URL] and they call them roles now, unless you are talking about server clusters.

Member Avatar for judithSampathwa
0
299
Member Avatar for Accendo

You'll need either addbefore (easiest) or addafter to sort. [code]Create a new empty list. Go through each item in your list Find first item in new list that is greater than current item. Add current item before this item New list is now in sorted order.[/code] This isn't the fastest …

Member Avatar for Accendo
0
1K
Member Avatar for vedro-compota

When something implements IEnumerable it needs a method called GetEnumerator that returns and IEnumerator object. This object is used by foreach and LINQ method to iterate through the collection. The syntax of [icode]IEnumerable.GetEnumerator()[/icode] is what as known as an explicit implementation of the interface. The main reason to do this …

Member Avatar for vedro-compota
0
142
Member Avatar for hery

You create a process object (line 2) and set some parameters and then execute "cmd.exe" without using the process at all (line 7 call to static Process.Start). Line 8/9 there is nothing running under this process object so these commands have nothing to do so you get the error. You …

Member Avatar for kvprajapati
0
1K
Member Avatar for bhoomikajodhani

Where exactly is it hanging? Have you run the code in the debugger and looked at the values of the variables? Have you single stepped through the code to see what was happening?

Member Avatar for bhoomikajodhani
0
95
Member Avatar for Zephyr-

Make randomizer a static class variable instead of an instance variable. What is happening is that all the generators are being created so fast that the seed value, which is based off the time, is the same. This causes them to all generate the same sequence. If you just have …

Member Avatar for ddanbe
0
128
Member Avatar for pseudorandom21

Depends on how you invoke the thread, but normally yes. It isn't passed on to the main thread but it can bring your whole system down.

Member Avatar for pseudorandom21
0
133
Member Avatar for JudeV

Wherever you declare them, since it isn't in this code, just add [icode]= 0;[/icode] to the end.

Member Avatar for JudeV
0
167
Member Avatar for xxxtian

Nope. If you tell it they need to be sorted, it's going to sort them. You can always sort them yourself and then place them in the combo box however makes you happy.

Member Avatar for Momerath
0
76
Member Avatar for yosamara

1) They are text boxes on the form that are being used to display some data. 2) No, not unless you are willing to pay my consulting rates, and I don't think you can afford me.

Member Avatar for Momerath
0
44
Member Avatar for chanthung

You insert a record, then call fill before update? Why? The fill method clears out changes that haven't been committed to the database.

Member Avatar for chanthung
0
187
Member Avatar for Zephyr-
Member Avatar for Momerath

Why isn't mine showing? On my profile it shows a ? that you can click on to see the picture. Image size is 200x150 and 25k

Member Avatar for Dani
0
110
Member Avatar for Xcelled194
Member Avatar for Fattman

I would average from the array. Having to go through the listview to get the values adds additional coding that just slows down the process. Also remember that since they are averages, divide by the number of students :)

Member Avatar for Fattman
0
271
Member Avatar for virusisfound
Member Avatar for Usmaan
Member Avatar for Momerath
0
61
Member Avatar for chandrabhanu

I'd do it by sending an async message with a timeout. If you don't get a response back in time you'd assume the client is dead. pseudorandom21's suggestion would tell you if the client machine is pingable, but I don't think that is what you were asking.

Member Avatar for Momerath
0
108
Member Avatar for comSysStudent

Don't put attendance in the events table, it's not part of the event. Create an events table, and an attendance table. The attendance table would have two columns: EventID and MemberID. Again, with the Race information you don't want to create columns for each race (what if you add more …

Member Avatar for Momerath
0
165
Member Avatar for baldwindc

If you want it easy, I'd stick with C/C++ for this kind of thing. You could do it in VB.Net or C# (or IronPython, etc.) but then you'd need to deal with the managed/unmanaged code differences.

Member Avatar for Momerath
0
143
Member Avatar for zachattack05

You run into the same problem on the server if they are background threads. Because they aren't closed (just ended) they leave the connection up until they timeout. If they are foreground threads then they block closing. You could attempt to close them and set a timeout to abort them …

Member Avatar for zachattack05
0
296
Member Avatar for eskimo456

Your ray is technically a line, as is the edge of the bounding box. Check if they intersect and where. Then check if the intersection point is within the segment that is the edge of the bounding box. If it is, use the distance between two points formula to find …

Member Avatar for eskimo456
0
168
Member Avatar for virusisfound
Member Avatar for arjunpk

In line 24 you are returning the elements of the node. [URL="http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.value.aspx"]Elements[/URL] don't have a Value (look at the chart under Element).

Member Avatar for arjunpk
0
146
Member Avatar for glyvery.happy

You have a foreign key constraint on the table and there is no record of the key you are trying to insert. In other words, one of the columns in ORDER_DRIVER is a foreign key in Driver, and the value you are putting in ORDER_DRIVER doesn't exist in Driver.

Member Avatar for Momerath
0
97
Member Avatar for pandukal21

You just need to use [URL="http://msdn.microsoft.com/en-us/library/ms224424.aspx"]String.IndexOf(String, Int32, StringComparison)[/URL]

Member Avatar for Momerath
0
62
Member Avatar for bgx90

1. Male 2. 49 3. c)Almost Always - Actually always. 4. c)Almost Always - Actually always. 5. c)Almost Always - Actually always. 6. c)Almost Always - Actually always. I'm diabetic, what's in food is important to me :)

Member Avatar for ntrncx
0
182
Member Avatar for carlitosway17
Member Avatar for JudeV

Line32 should be [icode]for (int iRow = iSize; iRow > 0; iRow--) {[/icode] Line 34 should be [icode]for (int iColumn = 0; iColumn < iRow; iColumn++) {[/icode]

Member Avatar for minitech
0
100
Member Avatar for iustitia

the sender argument will tell you which button you pressed. You just need to cast it to a button type.

Member Avatar for shootermac
0
160
Member Avatar for Jessurider
Member Avatar for judithSampathwa

Don't insert the () and - in the database, they are formating, not part of the actual data. When you pull them from the database, apply formating to display. If the value is null (no number) then you don't display anything.

Member Avatar for judithSampathwa
0
158
Member Avatar for Bilal gulbaz
Member Avatar for judithSampathwa

Have you taken a look at [URL="http://www.asp.net/mvc/tutorials"]this[/URL] page? If you check the security link, I suspect you'll find what you want.

Member Avatar for judithSampathwa
0
171
Member Avatar for shama_kandy
Re: HTML

[QUOTE=shelexelex;1494171]Html is a web scripting language, it has no compiler, its not like a programming language that has a compiler and since its not have a compiler, it cannot be compiled. Its just a language that tells the browser how to display a particular information.[/QUOTE] Actually you could make an …

Member Avatar for Momerath
0
134
Member Avatar for ProgWr

DLLImport is for DLLs that weren't written in managed code. All you need to do is add the DLL to your project references, include a 'using' statement for the namespace and you can use what is in the DLL.

Member Avatar for ProgWr
0
551
Member Avatar for CrimsonGT
Member Avatar for xxxtian

In your first form put something like this: [code]this.dataGridView1.Columns["ID"].Visible = false;[/code] It will hide the column but the data will still be there for you to use.

Member Avatar for akshintlakalyan
0
190
Member Avatar for kheddy

You need to add the dll to the references. Right click references, select add and browse for the dll.

Member Avatar for kheddy
0
132

The End.