Re: CSV file as database
- From: "Ed Sowell" <jag_man__REM0VE__653@xxxxxxxxxxxxx>
- Date: Wed, 15 Apr 2009 15:08:32 -0700
Seems that I've caused this CSV input thing to drift two a couple different threads. I wanted to report some progress, and I believe this thread is the best.
I now have a process that gets my CVS into MySQL without too much fuss. Here's what worked.
1. Go to http://www.sqldbu.com/eng/sections/tips/mysqlimport.html , which provides a Web application that converts CSV to MySQL. I just browsed to my ModelTable.csv on my Windows machine, and then pressed the Start button on the above page. That created a file ModelTable.txt that has a bunch of SQL INSERT INTO table commands.
2. Following a tip from Andrew Morton, I asked the tech at my Web hosting service how to run a MySQL admin console. The tech told me how to go to my account admin page, go to the MySQL databast tools page, and set myself up as a MySQL user.
3. That allowed me to create a database with nothing in it. It also gave me access to phpMyAdmin. which is MySQL console, if I can use that term. It allowed me to select the empty database. Once the database was created, there was a command button called SQL, that offered a panel into which SQL commands could be typed. It also, importantly, offered a "textfile" option which allows one to point at a text file containing SQL commands. It had a browse button that, much to my surprise, allowed me to browse on my Windows machine. After browsing to ModelTabel.csv I clicked the Go button, and walla, it created a table in my MySQL database with my ModelTable data in it. Note that I did not have to FTP the ModelTable.csv file to the Web server.
This is a big step forward. Now, I'm hoping that I can get back to my VB ..NET Web app and come up with a "connection string" that will work on both my Windows machine and the Web server.
Thanks to Cor, Andrew, and everyone else who has coached me on this. Don't go away, though!
Ed
"Cor Ligthert[MVP]" <Notmyfirstname@xxxxxxxxx> wrote in message news:e9bc2lXuJHA.4364@xxxxxxxxxxxxxxxxxxxxxxx
Hal,
Why, because there is nothing easier then to get the csv file direct as a dataset?
Cor
"Hal Rosser" <hmrosser@xxxxxxxxxxxxx> wrote in message news:6udDl.26539$v8.6561@xxxxxxxxxxxxxxxxxxxxxxxxx
"Ed" <jag_manR__EM*-0_V_E653@xxxxxxxxxxxxx> wrote in message news:ucq06o9tJHA.2596@xxxxxxxxxxxxxxxxxxxxxxxI want to use a table from an Excel work*** as a data source for a Web application. figuring that a CSV file would be more likely to work than XLS, I saved it as CSV and placed it in my project directory. However, when I try to connect to it via the connection properties dialog it fails. It seems to want an MDB file, but I don't know what that is.
You may find it easier to treat the csv file like a regular sequential access text file.
Open the file and read it one line at a time.
Use the split function to Split the 'line String' into values at the commas.
The other way is to import the csv into an Access database and you'll be able to use SQL to manipulate the data.
.
- References:
- CSV file as database
- From: Ed
- Re: CSV file as database
- From: Hal Rosser
- Re: CSV file as database
- From: Cor Ligthert[MVP]
- CSV file as database
- Prev by Date: refresh data in a datagridview
- Next by Date: Re: CSV file as database
- Previous by thread: Re: CSV file as database
- Next by thread: Re: CSV file as database
- Index(es):