469,602 Members | 1,793 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

SQLServer or Access?

Hi,

I need to store and retrieve information from a database. It looks as though
there is a lot more support for SQLServer than there is for Access, correct
me if I am wrong.

What do I have to do to get SQLServer and which version should I be using.
Or is SQLServer already part of the VS.Net? Are there any good examples that
you know of.

TIA
Roy
Nov 17 '05 #1
14 1924
Hi Roy,

I guess you need a small database.
Perhaps you might look at MSDE 2000 or MSDE 2005 which are scaled down
versions of Sql Server 2000/2005 and are free (when distributed with a
application produced with MS tool I think - not sure about licensing).

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Roy Gourgi" <ro***@videotron.ca> wrote in message
news:%l********************@wagner.videotron.net.. .
Hi,

I need to store and retrieve information from a database. It looks as
though there is a lot more support for SQLServer than there is for Access,
correct me if I am wrong.

What do I have to do to get SQLServer and which version should I be using.
Or is SQLServer already part of the VS.Net? Are there any good examples
that you know of.

TIA
Roy

Nov 17 '05 #2
Hi Miha,

No, unfortunately I am just learning C# and eventually I am going to need to
store and retrieve a lot of information. My database will be very, very
large.
Which is faster by the way. SQLServer or Access. I would imagine SQLServer
is faster.

I am shocked at the plethora of tools available and the many different ways
of doing things. I am overwhelmed to tell you the truth.

I found a little code that allows me to display a database in Access on the
screen. How do I write to the database for example. Furthermore, is this
example a good way to retrieve information or are there more efficient
methods. There seem to be so many ways, it's hard to know where to start.

using System;
using System.Data.OleDb;

class OleDbTest

{

public static void Main()

{

//create the database connection

OleDbConnection aConnection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=d:\\dbaccess\\db1.mdb");

//create the command object and store the sql query

// OleDbCommand aCommand = new OleDbCommand("select * from emp_test",
aConnection);

OleDbCommand aCommand = new OleDbCommand(
try

{

aConnection.Open();

//create the datareader object to connect to table

OleDbDataReader aReader = aCommand.ExecuteReader();

Console.WriteLine("This is the returned data from emp_test table");

//Iterate throuth the database

while(aReader.Read())

{

Console.Write(aReader.GetInt32(0).ToString());

Console.Write(" {0} {1} ",aReader.GetString(1),aReader.GetString(2));

Console.WriteLine();

// Console.WriteLine(" {0} ",aReader.GetString(2));

}

Console.ReadLine();

//close the reader

aReader.Close();

//close the connection Its important.

aConnection.Close();

}

//Some usual exception handling

catch(OleDbException e)

{

Console.WriteLine("Error: {0}", e.Errors[0].Message);

}

}

}

TIA
Roy


"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi Roy,

I guess you need a small database.
Perhaps you might look at MSDE 2000 or MSDE 2005 which are scaled down
versions of Sql Server 2000/2005 and are free (when distributed with a
application produced with MS tool I think - not sure about licensing).

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Roy Gourgi" <ro***@videotron.ca> wrote in message
news:%l********************@wagner.videotron.net.. .
Hi,

I need to store and retrieve information from a database. It looks as
though there is a lot more support for SQLServer than there is for
Access, correct me if I am wrong.

What do I have to do to get SQLServer and which version should I be
using. Or is SQLServer already part of the VS.Net? Are there any good
examples that you know of.

TIA
Roy


Nov 17 '05 #3
Sorry I copied the wrong example, here is the right one.

using System;

using System.Data.OleDb;

class OleDbTest

{

public static void Main()

{

//create the database connection

OleDbConnection aConnection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=d:\\dbaccess\\db1.mdb");

//create the command object and store the sql query

OleDbCommand aCommand = new OleDbCommand("select * from emp_test",
aConnection);

// OleDbCommand aCommand = new OleDbCommand(
try

{

aConnection.Open();

//create the datareader object to connect to table

OleDbDataReader aReader = aCommand.ExecuteReader();

Console.WriteLine("This is the returned data from emp_test table");

//Iterate throuth the database

while(aReader.Read())

{

Console.Write(aReader.GetInt32(0).ToString());

Console.Write(" {0} {1} ",aReader.GetString(1),aReader.GetString(2));

Console.WriteLine();

// Console.WriteLine(" {0} ",aReader.GetString(2));

}

Console.ReadLine();

//close the reader

aReader.Close();

//close the connection Its important.

aConnection.Close();

}

//Some usual exception handling

catch(OleDbException e)

{

Console.WriteLine("Error: {0}", e.Errors[0].Message);

}

}

}

"Roy Gourgi" <ro***@videotron.ca> wrote in message
news:%l********************@wagner.videotron.net.. .
Hi,

I need to store and retrieve information from a database. It looks as
though there is a lot more support for SQLServer than there is for Access,
correct me if I am wrong.

What do I have to do to get SQLServer and which version should I be using.
Or is SQLServer already part of the VS.Net? Are there any good examples
that you know of.

TIA
Roy

Nov 17 '05 #4
Hi,

when you just start developing apps with database
access you could also make use of Firebird. Firebird
is an open source database and totally free of charge.
On Codeproject.com you'll find an example of using
Firebird. One big advantage is that it's just enough to deliver
the firebird dll within your apps, instead of installing
a new database on the user computer.

Embedded Firebird:
http://www.codeproject.com/cs/databa...edFirebird.asp

Cheers
Lars

Nothing is impossible. UML is the key for all your problems.
AODL - Make your .net apps OpenOffice ready
http://aodl.sourceforge.net/
Roy Gourgi schrieb:
Hi,

I need to store and retrieve information from a database. It looks as though
there is a lot more support for SQLServer than there is for Access, correct
me if I am wrong.

What do I have to do to get SQLServer and which version should I be using.
Or is SQLServer already part of the VS.Net? Are there any good examples that
you know of.

TIA
Roy


Nov 17 '05 #5
Hi Roy,
--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Roy Gourgi" <ro***@videotron.ca> wrote in message
news:WO********************@weber.videotron.net...
Hi Miha,

No, unfortunately I am just learning C# and eventually I am going to need
to store and retrieve a lot of information. My database will be very, very
large.
Which is faster by the way. SQLServer or Access. I would imagine SQLServer
is faster.
Sql server should be faster. But Ithen it depends on scenario - Access is
simplier (it isn't in the same category as Sql Server) thus it might do some
actions faster..
However, there are other database features that are more important, such as
reliability.

I am shocked at the plethora of tools available and the many different
ways of doing things. I am overwhelmed to tell you the truth.

I found a little code that allows me to display a database in Access on
the screen. How do I write to the database for example. Furthermore, is
this example a good way to retrieve information or are there more
efficient methods. There seem to be so many ways, it's hard to know where
to start.


You might start by reading help on ado.net topic.
It is a good starting point.
Other than that - a book perhaps?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Nov 17 '05 #6

<la***********@web.de> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi,

when you just start developing apps with database
access you could also make use of Firebird. Firebird
is an open source database and totally free of charge.
On Codeproject.com you'll find an example of using
Firebird. One big advantage is that it's just enough to deliver
the firebird dll within your apps, instead of installing
a new database on the user computer.


Yes, this is a deployment heaven :-)

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/
Nov 17 '05 #7
SLQS and Access address two distinct application domains with some
overlap.
MSDE is basically a connection crippled version of SQLS minus
administration
tools that is included free with VisualStudioPro. SLQS provides 24X7
live backup,
transactional support, and logging for disaster recovery. So if you are
writing an
application that can grow to hundreds of users across a WAN you may want
to
program to SQLS.

Regards,
Jeff

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #8
Hi
Go for MSDE 2005 version. Its a scaled down version of SQL Server. When
you ever migrate to SQL Server you will be quiet comfortable , as
everything is almost the same. MSDE is far far better than Access as
one is a RDBMS and other DBMS.

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Nov 17 '05 #9

<sh**********@yahoo.com> wrote...
Go for MSDE 2005 version. Its a scaled down version of SQL Server. When
you ever migrate to SQL Server you will be quiet comfortable , as
everything is almost the same. MSDE is far far better than Access as
one is a RDBMS and other DBMS.


I wouldn't say that Access is a DBMS at all.

Access is "just" a front-end application to administrate, manage and
manipulate the data in a database, which can be an RDBMS or other. You can
use against Oracle, SQL Server, or whatever database that you can find an
ODBC-driver for.

Many people seem to confuse Access with its default databaseengine Jet,
which actually *is* an RDBMS.

Apart from that I agree with you that the OP should try MSDE as its scales
nicely to the full SQL Server.
// Bjorn A
Nov 17 '05 #10
Hi Bijorn
If i am not mistaken access also stores data --- so said from that
perspective.

-------
Regards ,
C#, VB.NET , SQL SERVER , UML , DESIGN Patterns Interview question book
http://www.geocities.com/dotnetinterviews/
My Interview Blog
http://spaces.msn.com/members/dotnetinterviews/

Nov 17 '05 #11

<sh**********@yahoo.com> wrote...
Hi Bijorn
If i am not mistaken access also stores data --- so said from that
perspective.


Not from the database perspective.

It can store forms, etc, inside the same file (mdb) as the Jet-engine stores
the data for the database.

But that still doesn't make Access more of a DBMS than MS Word, which also
stores data...

// Bjorn A
Nov 17 '05 #12
Hi Roy,

Don't pay attention to what seems to have "the most" support in the .Net
CLR. Look at your requirements. The Framework has plenty of capability for
handling any kind of database.

In your case, you say that your application will eventually need to store
and retrieve a lot of data. You didn't say, but it could be presumed by the
scale, that it will also have to handle a lot of traffic, and possibly over
a network. In that case, you're talking about a large-scale database server,
not a medium-scale file-base database. So, SQL Server is the way to go.

Now, if you're worried about designing your SQL Server database, well, you
should be. First of all, you have to think about the amount of data it will
hold, and how to most efficiently store it, and maintain it. SQL Server is
well-equipped with plenty of functionality for everything you can imagine.
So, I would suggest that what you know about databases from working with
Access will be inadequate at some near point in the future. You might
consider contracting the database design out, hiring a DBA, or whatever fits
your budget.

In the meantime, there's no reason why you can't get started. Fortunately,
Access can integrate with SQL Server quite well, and you can work with a SQL
Server database via Access, and use the familiar Access interface to create
your database tables, stored procedures, etc. Just read the Access help on
SQL Server database projects.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"Roy Gourgi" <ro***@videotron.ca> wrote in message
news:WO********************@weber.videotron.net...
Hi Miha,

No, unfortunately I am just learning C# and eventually I am going to need
to store and retrieve a lot of information. My database will be very, very
large.
Which is faster by the way. SQLServer or Access. I would imagine SQLServer
is faster.

I am shocked at the plethora of tools available and the many different
ways of doing things. I am overwhelmed to tell you the truth.

I found a little code that allows me to display a database in Access on
the screen. How do I write to the database for example. Furthermore, is
this example a good way to retrieve information or are there more
efficient methods. There seem to be so many ways, it's hard to know where
to start.

using System;
using System.Data.OleDb;

class OleDbTest

{

public static void Main()

{

//create the database connection

OleDbConnection aConnection = new
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=d:\\dbaccess\\db1.mdb");

//create the command object and store the sql query

// OleDbCommand aCommand = new OleDbCommand("select * from emp_test",
aConnection);

OleDbCommand aCommand = new OleDbCommand(
try

{

aConnection.Open();

//create the datareader object to connect to table

OleDbDataReader aReader = aCommand.ExecuteReader();

Console.WriteLine("This is the returned data from emp_test table");

//Iterate throuth the database

while(aReader.Read())

{

Console.Write(aReader.GetInt32(0).ToString());

Console.Write(" {0} {1} ",aReader.GetString(1),aReader.GetString(2));

Console.WriteLine();

// Console.WriteLine(" {0} ",aReader.GetString(2));

}

Console.ReadLine();

//close the reader

aReader.Close();

//close the connection Its important.

aConnection.Close();

}

//Some usual exception handling

catch(OleDbException e)

{

Console.WriteLine("Error: {0}", e.Errors[0].Message);

}

}

}

TIA
Roy


"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi Roy,

I guess you need a small database.
Perhaps you might look at MSDE 2000 or MSDE 2005 which are scaled down
versions of Sql Server 2000/2005 and are free (when distributed with a
application produced with MS tool I think - not sure about licensing).

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Roy Gourgi" <ro***@videotron.ca> wrote in message
news:%l********************@wagner.videotron.net.. .
Hi,

I need to store and retrieve information from a database. It looks as
though there is a lot more support for SQLServer than there is for
Access, correct me if I am wrong.

What do I have to do to get SQLServer and which version should I be
using. Or is SQLServer already part of the VS.Net? Are there any good
examples that you know of.

TIA
Roy



Nov 17 '05 #13
Actually I believe it is a ISAM.

--

Derek Davis
dd******@gmail.com

"Bjorn Abelli" <bj**********@DoNotSpam.hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

<sh**********@yahoo.com> wrote...
Go for MSDE 2005 version. Its a scaled down version of SQL Server. When
you ever migrate to SQL Server you will be quiet comfortable , as
everything is almost the same. MSDE is far far better than Access as
one is a RDBMS and other DBMS.


I wouldn't say that Access is a DBMS at all.

Access is "just" a front-end application to administrate, manage and
manipulate the data in a database, which can be an RDBMS or other. You can
use against Oracle, SQL Server, or whatever database that you can find an
ODBC-driver for.

Many people seem to confuse Access with its default databaseengine Jet,
which actually *is* an RDBMS.

Apart from that I agree with you that the OP should try MSDE as its scales
nicely to the full SQL Server.
// Bjorn A

Nov 17 '05 #14
Hi,

Thanks everybody for your input. I think that I will heed the advice with
regards to MSDE 2000 or 2005 because inevitably I will have to go with
SQLServer and since MSDE 2000 or 2005 is a watered down version, it will be
easier to make the transition.

Roy

"Roy Gourgi" <ro***@videotron.ca> wrote in message
news:%l********************@wagner.videotron.net.. .
Hi,

I need to store and retrieve information from a database. It looks as
though there is a lot more support for SQLServer than there is for Access,
correct me if I am wrong.

What do I have to do to get SQLServer and which version should I be using.
Or is SQLServer already part of the VS.Net? Are there any good examples
that you know of.

TIA
Roy

Nov 17 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Devonish | last post: by
2 posts views Thread by Papa_K | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.