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

Extract info from census bureau

How, do i extract first and last names from the census bureau website and add it into an sql 2000 table in c# windows application

Here's what i have attempted so far:

//class1.c



using System;

using System.Collections.Generic;

using System.Text;

using System.Net;

using System.IO;



namespace Project_3

{

class Class1

{

static void main(string[] args)

{

StringBuilder str = new StringBuilder();

byte[] buffer = new byte[65535];



//request page

HttpWebRequest request = (HttpWebRequest)

WebRequest.Create("http://www.census.gov/genealogy/names/dist.female.first");



//execute web page

HttpWebResponse response =(HttpWebResponse)

request.GetResponse();



//read data from web page

Stream read_stream = response.GetResponseStream();



string temp = null;

int ct = 0;



do

{

//fill buffer

ct = read_stream.Read(buffer, 0, buffer.Length);

if (ct != 0)

{

temp = Encoding.ASCII.GetString(buffer, 0, ct);



//append

str.Append(temp);

}

} while (ct > 0);



}

}

}
Any help will be appreciated
Thanks, :)
Jul 10 '07 #1
0 737

Sign in to post your reply or Sign up for a free account.

Similar topics

385
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
1
by: Robert Marshall | last post by:
Hi all, Hoping someone can help me with an issue I'm having. I'm using AccessXP to create a database of U.S. Census records. After keying the data in, I decided to run a query to create a...
0
by: Aaron N. Russo | last post by:
Is there a way to input an address, then have mapPoint 2004 return the census tract number to me? thanks Aaron
8
by: rbt | last post by:
On windows xp, is there an easy way to extract the information that Python added to the registry as it was installed?
5
by: deko | last post by:
If I have random and unpredictable user agent strings containing URLs, what is the best way to extract the URL? For example, let's say the string looks like this: registered NYSE 943 <a...
1
by: caine | last post by:
I want to extract web data from a news feed page http://everling.nierchi.net/mmubulletins.php. Just want to extract necessary info between open n closing tags of <title>, <categoryand <link>....
15
by: edwire | last post by:
I'm trying to extract data from 3 textboxes to another line in the same page using the onblur command. My client inputs their 5 digit zipcode and OnBlur fills the city and state from a database...
5
by: =?Utf-8?B?aWxy?= | last post by:
Hi This is probably fairly simple but I am newish at programming and was wondering if someone can give me some advice on handling the following. I have an array with a large number of elements...
1
by: GS | last post by:
I need to extract sections out of a long string of about 5 to 10 KB, change any date format of dd Mmm yyyy to yyyy-mm-dd, then further from each section extract columns of tables. what is the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.