473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

cannot run diffgram in webservice

Could u please tell me why the following codes cannot run in webservice while
these codes can be run in a window form? Thanks.
The following is the error messge from IE:"HTTP 500 - Internal server error
" after I invoked.And I went through step by step debugging, the same error
message was shown,no further information.
[WebMethod]
public string test()
{
DataRow tempRow;
SqlXmlAdapter ad;
MemoryStream ms=new MemoryStream();
SqlXmlCommand cmd=new SqlXmlCommand("Provider=SQLOLEDB;data
source=\"127.0.0.1\";initial catalog=Northwind;user id=\"test\";
password=\"test\"");
cmd.RootTag="ROOT";
cmd.CommandText="Emp";
cmd.CommandType=SqlXmlCommandType.XPath;
cmd.SchemaPath="..\\XMLSchema1.xsd";
DataSet ds = new DataSet();
ad=new SqlXmlAdapter(cmd);
ad.Fill(ds);
tempRow=ds.Tables["Emp"].Rows[0];
tempRow["FName"] = "Susan";
ad.Update(ds);
return "ok";
}
the codes in windows form:
private void button2_Click(object sender, System.EventArgs e)
{
DataRow row;
SqlXmlAdapter ad;
MemoryStream ms = new MemoryStream();
SqlXmlCommand cmd=new SqlXmlCommand("Provider=SQLOLEDB;data
source=\"127.0.0.1\";initial catalog=Northwind;user id=\"test\";
password=\"test\"");
cmd.RootTag = "ROOT";
cmd.CommandText = "Emp";
cmd.CommandType = SqlXmlCommandType.XPath;
cmd.SchemaPath = "..\\XMLSchema1.xsd";
DataSet ds = new DataSet();
ad = new SqlXmlAdapter(cmd);
ad.Fill(ds);
row = ds.Tables["Emp"].Rows[0];
row["FName"] = "Susan";
ad.Update(ds);
textBox1.Text="It is ok.";
}

Nov 23 '05 #1
1 1110
"=?Utf-8?B?Z29vZG1hbm5ld3o=?=" <go*********@discussions.microsoft.com>
wrote in news:8E**********************************@microsof t.com:
The following is the error messge from IE:"HTTP 500 - Internal server
error " after I invoked.And I went through step by step debugging, the


In IE, turn off friendly errors and try again. I suspect I know what you
problem already is, but Im not going to chase ghosts, I need more info.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mav | last post by:
Hello, I'm trying to fill a dataset with the data of a diffgram xml-file. I expect a dataset with datasetname "ComputerSystem" filled with 1 table (tables.count = 1). The only thing i've got...
1
by: John Lee | last post by:
Hi, When I use DataSet.WriteXml(filename, XmlWriteMode.DiffGram), the xml file contains current values (at <InvDataSet> node) and original value (at <diffgr:before> node) - this means the...
0
by: Guoqi Zheng | last post by:
Dear sir, I am very new to asp.net. I often meet a problem of name 'xxx' is not declared. can some one tell me what is the problem? For example, my following code gives me an error of "Name...
1
by: Nalaka | last post by:
Hi, I have a webservice application(asp.net 2.0) running on IIS 6.0 ... win 2003. I can call the webservice from the local machine, but if I call the web service from a different machine, the...
0
by: Rene Ruppert | last post by:
Hi, On the web I found a simple sample/tutorial for a webservice, some kind of chat software. I implemented the server and the client. When I run the client form on the host PC everything works...
0
by: jman | last post by:
I've seen this question asked a lot, but never answered. Does any one know how to validate a DiffGram against a xsd schema? Is there anywhere I can find the schema for DiffGram? I keep finging...
2
by: Paul Goldmann | last post by:
Hi, is there a way how to get a DiffGram from a dataset and save it to a string? Thanks for any advice Paul
1
by: GoogleGroups | last post by:
It seems like this should be easy, but it has proven to be quite painful. I have an existing dataset, which I used the GetChanges and WriteXML functions upon to write out a DiffGram to a local...
4
by: eschneider | last post by:
I get the following error when trying to browse the .asmx. I get the same thing when trying to add a reference. using .NET 2.0 There is no error message. Any ideas? Thanks,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.