473,325 Members | 2,805 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,325 software developers and data experts.

xml and sql server 2k problem

hello everyone
I have a problem with xml and sql server 2k.
first thing i have a website named this->
http://en.infosites.org/info/keyword.
when i am entering a value for keyword like this ->
http://en.infosites.org/info/value now when this page opens in
browser(IE or Mozila FF) it shows only xml tags with some text as
contents. now i have to save this in sql server 2k i have a table in
that i have field as xml tags. i want to save entire thing which i
displayed in browser.
how to proceed i dont know. if anyone has idea the plz share with me .
its urgent
Thanks
Dhananjay

Dec 7 '06 #1
5 1550
Dhananjay,

Well, you would want to use the HttpWebRequest/HttpWebResponse classes
to get the contents of the site. Once you do that, you can get the response
stream from the HttpWebResponse to feed the XmlDocument class to load the
document.

Once you have that, it's a simple matter of using the classes in
System.Data.? (where ? is specific for your database) to insert the data.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dhananjay" <dh**********@yahoo.co.inwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
hello everyone
I have a problem with xml and sql server 2k.
first thing i have a website named this->
http://en.infosites.org/info/keyword.
when i am entering a value for keyword like this ->
http://en.infosites.org/info/value now when this page opens in
browser(IE or Mozila FF) it shows only xml tags with some text as
contents. now i have to save this in sql server 2k i have a table in
that i have field as xml tags. i want to save entire thing which i
displayed in browser.
how to proceed i dont know. if anyone has idea the plz share with me .
its urgent
Thanks
Dhananjay

Dec 7 '06 #2

Nicholas Paldino [.NET/C# MVP] wrote:
Dhananjay,

Well, you would want to use the HttpWebRequest/HttpWebResponse classes
to get the contents of the site. Once you do that, you can get the response
stream from the HttpWebResponse to feed the XmlDocument class to load the
document.

Once you have that, it's a simple matter of using the classes in
System.Data.? (where ? is specific for your database) to insert the data.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Dhananjay" <dh**********@yahoo.co.inwrote in message
news:11**********************@f1g2000cwa.googlegro ups.com...
hello everyone
I have a problem with xml and sql server 2k.
first thing i have a website named this->
http://en.infosites.org/info/keyword.
when i am entering a value for keyword like this ->
http://en.infosites.org/info/value now when this page opens in
browser(IE or Mozila FF) it shows only xml tags with some text as
contents. now i have to save this in sql server 2k i have a table in
that i have field as xml tags. i want to save entire thing which i
displayed in browser.
how to proceed i dont know. if anyone has idea the plz share with me .
its urgent
Thanks
Dhananjay
================================================== ====

hi Nicholas Paldino

i ahve passed this
public void page_load()
{
Uri uri = new Uri("http://de.wikipedia.org/wiki/indien");
if (uri.Scheme == Uri.UriSchemeHttp)
{
HttpWebRequest req =
(HttpWebRequest)HttpWebRequest.Create(uri);
req.Method = WebRequestMethods.Http.Get;
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
StreamReader sr = new
StreamReader(res.GetResponseStream());
string tmp = sr.ReadToEnd();
res.Close();
this.txturl.Text = tmp;
}
}
but i have got error it is not opening this url. i have got problem in
webresponse it is showing null can u coorect and plz send me.

reply me asap
its urgent

Thanks
Dhananjay

Dec 8 '06 #3
Random question; how does this relate to either xml or sqlserver?
The main problem that the page 403s; try adding a trailing slash...

However in 2.0 a better solution may be to use WebClient:

string html;
using (WebClient client = new WebClient()) {
html =
client.DownloadString(@"http://de.wikipedia.org/wiki/indien/");
}
this.txturl.Text = html;

Marc
Dec 8 '06 #4

Marc Gravell wrote:
Random question; how does this relate to either xml or sqlserver?
The main problem that the page 403s; try adding a trailing slash...

However in 2.0 a better solution may be to use WebClient:

string html;
using (WebClient client = new WebClient()) {
html =
client.DownloadString(@"http://de.wikipedia.org/wiki/indien/");
}
this.txturl.Text = html;

Marc
================================================== =====

hi marc

i have tried this code also which is provied by you but i have got
error
the error is
The remote server returned an error: (403) Forbidden. what sould i do
do you have any other solution let me know plz
its urgent Thanks Dhananjay

string html;
using (WebClient client = new WebClient()) {
html =
client.DownloadString(@"http://de.wikipedia.org/wiki/indien/");
}
this.txturl.Text = html;
Thanks
Dhananjay

Dec 9 '06 #5
Well I'll be jiggered! Case sensitivity. I know that the spec. allows
for this, but it is quite rare to see it in reality (for a simple GET,
at least) ;-p

Following works for me; I have tested it properly this time!
html = client.DownloadString(@"http://de.wikipedia.org/wiki/Indien");

Marc

Dec 9 '06 #6

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

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
2
by: epaetz | last post by:
I'm getting Not associated with a trusted SQL Server connection errors on a .Net windows service I wrote, when it's running on my application server. It's not a problem with mixed mode...
0
by: AlessanBar | last post by:
Hello Friends !! I have a strange problem, and I need to know what would be the source of this. I have a laptop computer with the following configuration: Pentium III Brand : Toshiba Speed :...
3
by: Michael | last post by:
Dear All I have problem with my database server which running SQL server 2000. The server running very slow. The worst case, to save a record required more than 20-30 seconds. Since this...
2
by: Helge Kalnes | last post by:
We are running an ASP.NET application on a cluster of 3 web-servers, using the Network Load Balancing feature of Application Center. We have synchronized the machineKey in machine.config on the 3...
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
22
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to...
1
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.