|
the StudentNumber is my primary key
|
|
|
|
|
If you have more then one tables, please give us an illustration.
Do you try to insert "Students" twice ?
|
|
|
|
|
yes you can say that coz i insert a student number more than once but with a different module code
example
StudentID ModuleCode
s20600752 WIC33222
s20502106 MKI4563
s20600752 LKH7566
s20600752 POU35568
s20502106 KLK67887
|
|
|
|
|
it will crash on Student s20600752, Line 3 !! this key is already there.
set your primary key on both fields "StudentID" and "ModuleCode" and make sure you don't insert a student with the "ModuleCode" twice.
|
|
|
|
|
Thanx for replying so quick. i have jst set my primary key on both fields an ran it and it still gives me the same error.
|
|
|
|
|
That make no sense.
You really sure you don't insert different module codes for the same student?
Try your routine with fewer data. I hope that will help you to find the problem.
|
|
|
|
|
What is the primary key for registrations table? If it is only student then you'll have a problem since student can have only one module.
If the table definition is correct, but you have duplicate data (for example because of denormalization), you can disable the primary key, load the data, clean the data and enable the primary key.
Hope this helps,
Mika
|
|
|
|
|
Ok here is what i am doing.The tble is an asociative entity between table student and table module.so it gets its data from both tables.what i did was jst make the StudentID(from table student) my primary key.A student can be registerd for more than 1 module .i want to have duplicate student numbers but with different module IDs. do you get me?
|
|
|
|
|
Yep, define both StudentID and ModuleID for the same primary key (multicolumned key)
|
|
|
|
|
thnx ey i'll try that and get back to you
|
|
|
|
|
Having used BCP and bulkcopy to move massive amounts of data I can recommend the following.
Move your data into a staging table.
Manage your transformations by stored procedure AFTER the bulk loading of the data is completed.
You have a structural issue, a relational database is NOT a spreadsheet. This data should obviously be goung into 3 or more tables. Student, Course and a manytomany link table.
Load the data and then insert/update the student table, update/insert the course table, update/insert the linking table (this has studentid and courseid and data pertaining to this link, scores etc)
Twyce, this is database design 101, I recommend you do some study on the proper design of data structures.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have followed this video (writing in C#, a bit rusty) and am stuck on DataSet/DataTable related issues.
I get to the OrdersDataSet
Partial Class OrdersDataSet
Partial Class OrdersDataTable
Here I make an attempt to select the ColumnChanged event in the Members list for the DataTable, yet it is not in this list. (neither is the event declaration in the designer code). It appears in the Object Browser as an inherited member. Anyone have any suggestions please?
Then with respect to the queries in the TableAdapter of the declared DataSet. When selecting Configure from the context menu for the default Fill,GetData() query definition I get the TableAdapter Configuration Wizard Window with an Advanced Options button. I added an additional query with a simple filter, and cannot set any Advanced Options. The button does not appear. Am I perhaps missing something here?
Many thanks,
Chaz
|
|
|
|
|
That uses a wizard.
If you don't see something in a drop down list and you know it is there manually assign the event in the code behind after the Initialize method gets called from the constructor.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
But Ennis that's how they start learning, grab an MS product, start following the bloody wizards and have absolutely no idea what is happening under the hood. The main problem I see is that the more traditional and experienced developers then have no idea what they are talking about and cannot help them.
There are some exceptions to this of course, Dave K comes to mind.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
That's why when I give programming tests my first statement is without using the IDE do x. I weed out 90% right there. Wizard development is great as long as you do everything the wizard author intended. (Of course you said that between the lines I just wanted to state it aloud). I am just a little cynical because I am tired of having to justify myself in a market full of people that think they need to right a custom sorting algorithm because the List.Sort is inefficient, to say nothing about the fact that quick sort is a fairly decent algorithm and that their massive for loop conflagration doesn't actually work in several test cases.
Eh, I am just becoming an old codger I suppose.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
I want to show a form if a user click inside the propertyGrid value field. I couldn't find any event that let u know if the field got the focus.
|
|
|
|
|
|
This event, is called when something got changed within the fields. What i want to do is that if a user want to make any changes I want to display a form, so through that they can do the editing.
|
|
|
|
|
I was afraid of that. Good to know!
Then the only thing that comes in mind is that you wire Click/MouseUp... and KeyPress/KeyUp and keep track in code, what is SelectedGridItem.
Mika
P.s. You can control editors for properties (windows for editing collections, complex types etc...) using attributes if that's what you want.
|
|
|
|
|
Hello Friends,
I am a .Net Developer. I have implemented FAX Utility into my application by using FAXCOMLib. It allows me to send a FAX using phone line. I usually send a PDF file on FAX. But from last few days when i send FAX using my application it send FAX successfully, but at the destination machine, half FAX is printed & half is empty.
Can any one help me out.
I shall be very thankful.
Regards
Dinker Batra
|
|
|
|
|
Perhaps the destination is running low on ink
But seriously, if no problems (exceptions or other) occur on the sending side, you could use two different destination machines to test if the problem is in sending or receiving.
|
|
|
|
|
Hi Mika,
Thanks, You are probably right, but is it a chance that the error is due to some Document Translation or Temporary Memory (Buffer) is full. Because for small PDF files its running very well.
But when i send some large file, it gives send half empty report.
What do u say
|
|
|
|
|
Most definitely if this problem occurs only on large documents, you are running low on memory on either side (propably at destination).
However, if you could test the same document against two different receivers, it would clarify the situation. Could you possible use the same machine as receiver. Also double check that you are not getting any errors from the code sending the fax.
|
|
|
|
|
I got a project from teacher but I can't do it. Anyone have any idea or any sample to show me as a guideline --> please help.
My project : I need to create a calculator program using any language but if it is C# it would be great. However, the input of this calculator must be assemble and output is binary. So, it means calculator program must accept assembly as input and print out binary as output.
Input sample:
MOV AX, 3 AX <- 3
ADD AX, 2 AX <- AX +2
MUL AX, 8 AX:BX <- AX *8
DIV AX, 5 AX:BX <- AX / 5
Pleaseeeeeee help me as soon as possible.
Thanks a lot.
|
|
|
|
|
nanaka9 wrote: I got a project from teacher but I can't do it
We don't do the homework here.
I would suggest you to start with the application and in between if you have any problems than you can post a question to get it clarified.
All the best.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|