DB + C# (I have no DB experience)

Started by
4 comments, last by kordova 20 years ago
I've picked up some books that detail how to interact with a DB through C# and have worked with SQL in class. The professor recommended Oracle, which I've downloaded and installed. My question now is how do I get the connection string to connect? A classmate recommended MySQL as easier though I'm not sure it's worth the trouble to install that as well only to run into what may end up to be the same problem. I'll look around in any event. I can run SQL Plus and give the standard Scott/Tiger login as I've done in class but is this logging into a database or is it temporary? There's a ton of stuff to look through and googling isn't really helping too much for these very initial steps. Thanks in advance for any help... [edited by - kordova on April 12, 2004 5:46:14 PM]
Advertisement
Hmmm, it does seem as though MySQL may be a simpler approach... this tutorial covers a lot of ground for me. My only question now, aside from connectivity ones at some point, is about this step:
quote:
When prompted, enter the password corresponding to the ‘root’—that you had set before. Now enter the following command at the mysql prompt:

create database mp3collection;
use mp3collection;
create table mp3files (sno smallint unsigned auto_increment not
null,title char(50),artist char(20),album char(50),filename char(50), primary key (sno));
grant all on mp3col lection.* to csharp@127.0.0.1 identified by ‘csharp’;

Do I have to use all of that in order to set up a db to access or can I leave it at create database my-database; and just access with user name root and it''s pw?
You basically need all of it because a database without a table is pretty much useless (the table holds all your data, the DB just keeps it organized).

quote:Original post by Anonymous Poster
You basically need all of it because a database without a table is pretty much useless (the table holds all your data, the DB just keeps it organized).


What I mean is, can''t I create it without a table, then populate it with a program that accesses it? Though, I do see your point as you''d only need to add tables once (initialization). Thanks.
try msde instead.
Using oracle/mysql, sqlserver etc shouldn''t make a difference, it''s how you connect to them (odbc,ado etc) which makes more difference. .net has special oracle namespaces but you can use odbc as easily which would let you more easily change your database provider later.
For connection strings look here

This topic is closed to new replies.

Advertisement