|
Dude, you are in the wrong forum.
nashikoy wrote: because our prof. is irresponsible...
I don't think she is. How can you learn without challenges?
nashikoy wrote: the deadline is today...
That isn't anyone's problem around here, but your own Quit whining and get your assignment done.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I am working on an existing proxy to a webservice. Making name changes and such.
Inside the generated proxy there are two (main) partial classes there
1)
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "TTWDiabetesDataServiceSoap", Namespace = "http://ns.com/")]
public partial class TTWDiabetesDataServiceWse : Microsoft.Web.Services3.WebServicesClientProtocol
and
2)
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name = "TTWDiabetesDataServiceSoap", Namespace = "http://ns.com/")]
public partial class TTWDiabetesDataService : System.Web.Services.Protocols.SoapHttpClientProtocol
Notice the only difference between the two is one class has a Wse at the end, the other not. Plus, the first one derives from WebServicesClientProtocol and the 2nd one SoapHttpClientProtocol.
My question is, how do I generate both of those in the proxy? I do a wsdl and it only generates the 2nd one..not the first one.
Thanks
|
|
|
|
|
Hi,
The second one is obvious since it's the actual web service client. But the first one is odd. It could have something to do with designer since Services3 isn't documented namespace and neither is WebServicesClientProtocol .
However if you want to manually generate proxy, the second one is enough. Just generate the cs and modify names etc. It should be usable (currently using this technique for all web services instead of Visual Studio IDE generation).
Hope this helps,
Mika
|
|
|
|
|
Thanks Mika for the quick reply. I meant to add to the post that most of the code that calls the proxy, actually calls method 1. and not 2. I don't understand where it came from and there is no one to really ask on my end. So I'll continue to troubleshoot and call Method 2 and see what it does. Thanks again for the time and reply.
|
|
|
|
|
You're welcome
You might want to check if the TTWDiabetesDataService is used somewhere in the generated code to provide the functionality for TTWDiabetesDataService (or vice versa). Just right click above the name and "Find all references". This may help to clarify the situation.
|
|
|
|
|
Mika Wendelius wrote: It could have something to do with designer since Services3 isn't documented namespace and neither is WebServicesClientProtocol.
Service3 is part of WSE3, and it simply inherits from the default web services base class.
|
|
|
|
|
The first one uses Microsoft Web Service Enhancements 3, which is not included in .NET, but is a separate download. Goolge for WSE3.
|
|
|
|
|
Eeek, I should read all replies before I just say what has been said
|
|
|
|
|
Now it makes sense. Excellent feedback guys. Thanks
|
|
|
|
|
I am using bulkcopy to import data into SQL server database.The data i'm trying to import contains student numbers and the modules that they are registerd for.A student can be registered for many modules(which means one student number can appear many times on the table).Problem is when i try to import my spradsheet my application throws a "Violation of PRIMARY KEY constraint" error.
How do i fix this
|
|
|
|
|
Hi Twyce,
you have a duplicate value on the primary key.
On which field / fields you have set the primary key ??
Greetings
Ralph
|
|
|
|
|
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
|
|
|
|