Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / May 2005

Tip: Looking for answers? Try searching our database.

cannot run diffgram in webservice

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
goodmannewz - 11 May 2005 01:07 GMT
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.";
}
Chad Z. Hower aka Kudzu - 11 May 2005 06:42 GMT
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.