473,785 Members | 3,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Opinion on best data access method

My name is Glenn, I am an experienced VB5.0/6.0 programmer who is starting a
new project using VB.NET.

The project is simple but will be using a .mdb file for storing of data.
Only one person will be accessing the database at one time and the database
will be stored on a mapped shared folder.

I have been reading on ADO.NET and am getting a little confused and
wondering if I am am doing the right thing. The use of Data Adapters and
Data Sets just seems to be quite complicated for a small use of data access.

I am posting this to ask for an opinion on the best method to access this
database in this app. I am very happy to research the suggestions, I just
dont want to waste time researching something that wont suit/work.

If there are any further information you require please aks anything you can.

Thank you.

Glenn.
Jul 21 '05 #1
6 1664
Tippy,

I had when I started with it the same opinion as you, however AdoNet is
basicly very easy to use (In a multiuser environment it becomes more
complex, however that is as well with AdoDB in my opinion).

Have a look at the resource kit.

VB.net Resource kit
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

And if you have problems installing the resource kit
http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

Newsgroups for VBNet and for AdoNet are

microsoft.publi c.dotnet.langua ges.vb
microsoft.publi c.dotnet.framew ork.adonet

And please do not multipost, when you have a question where you do not know
where to place it crosspost it, that is no problem at all in dotNet
newsgroups. (Crossposting sending one message to more newsgroups).

I hope this helps?

Cor

Jul 21 '05 #2
<"=?Utf-8?B?VGlwcHkgRw= =?=" <Tippy G@discussions.m icrosoft.com>>
wrote:
I have been reading on ADO.NET and am getting a little confused and
wondering if I am am doing the right thing. The use of Data Adapters and
Data Sets just seems to be quite complicated for a small use of data access.


One thing to bear in mind is that you don't have to use DataSets
themselves - they're just collections of DataTables. You can ignore
DataSets and go straight for DataTables to use with DataAdapters.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #3
Jon,

One thing to bear in mind is that you don't have to use DataSets
themselves - they're just collections of DataTables. You can ignore
DataSets and go straight for DataTables to use with DataAdapters.


I would not give that advice, using datatables gives problems when you want
to save it as a file, serialize it for web use and things like that.

I saw a lot of messages from people who takes that datatable approach and
become a little bit in trouble.

Of course is a datatable almost a disconnected lookalike from a recordset.

Just my 2 cents

Cor


Jul 21 '05 #4
Cor Ligthert <no**********@p lanet.nl> wrote:
One thing to bear in mind is that you don't have to use DataSets
themselves - they're just collections of DataTables. You can ignore
DataSets and go straight for DataTables to use with DataAdapters.
I would not give that advice, using datatables gives problems when
you want to save it as a file, serialize it for web use and things
like that.


You can always put a DataTable into a DataSet if you need to, later on.

Furthermore, bear in mind that the OP specifically said it was for a
simple project - I very much doubt that it will incur any of the
problems above. When the problem's simple, I recommend using a simple
solution :)
I saw a lot of messages from people who takes that datatable approach
and become a little bit in trouble.


That doesn't necessarily mean that using DataTables was the problem, of
course...

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #5
Jon,
You can always put a DataTable into a DataSet if you need to, later on.

No you cannot put a datatable into a dataset.

A dataset is an object that holds references to datatables. You can create a
new dataset and add references in the tableproperty from that too datatables
using the tables.add method

A dataset is not a container that holds values in a very classic way.
Furthermore, bear in mind that the OP specifically said it was for a
simple project - I very much doubt that it will incur any of the
problems above. When the problem's simple, I recommend using a simple
solution :)


Therefore I would not point on alternatives with Newbies, take the approach
as it is the most written on MSDN, and that is using the dataset.
I saw a lot of messages from people who takes that datatable approach
and become a little bit in trouble.


That doesn't necessarily mean that using DataTables was the problem, of
course...


If you say so, can you give me an example what it could have been?

Cor
Jul 21 '05 #6
Cor Ligthert <no**********@p lanet.nl> wrote:
You can always put a DataTable into a DataSet if you need to, later on.
No you cannot put a datatable into a dataset.


Um, yes you can, in exactly the way that you then describe...
A dataset is an object that holds references to datatables. You can create a
new dataset and add references in the tableproperty from that too datatables
using the tables.add method
In what way is that not putting a DataTable into a DataSet? The result
is exactly the same as if you created the DataSet and populated it
automatically, then retrieved the DataTable.
A dataset is not a container that holds values in a very classic way.


It's a container in the same way that (say) an ArrayList is.
Furthermore, bear in mind that the OP specifically said it was for a
simple project - I very much doubt that it will incur any of the
problems above. When the problem's simple, I recommend using a simple
solution :)


Therefore I would not point on alternatives with Newbies, take the approach
as it is the most written on MSDN, and that is using the dataset.


But that involves more complexity than just using DataTables.
I saw a lot of messages from people who takes that datatable approach
and become a little bit in trouble.


That doesn't necessarily mean that using DataTables was the problem, of
course...


If you say so, can you give me an example what it could have been?


If you could give me an example of the problem, certainly :)

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #7

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

Similar topics

5
4950
by: great_googley_moogley | last post by:
Greetings, I am in the process of installing a SQL database at a customer location. I have determined that there are 3 ways to do this, and I wanted to know which is the best of the 3. 1 Install From Script. In this method I create the database and its objects in scripts that are run via osql utility on the SQL server machine. For loading any initial data that I need in the database I also run bcp commands.
2
3658
by: Joe Bloggs | last post by:
I have a general question on best practice regarding data access. I have the code below, a static method defined in a class that I use in a data layer dll. The method takes a string as its parameter, connects to the database , executes the string (in this case SQL) in the form of a SqlDataReader and then returns the SqlDataReader. Here's the method... public static SqlDataReader SQLServerExecuteSQL(string SQLstr) {
14
2204
by: LP | last post by:
Hi, I will be taking on a new project developing a web-based "reporting system". The first requirement I got from BI group is "we just want to look at the data". Basically, there is a huge database, and they want certain people to be able to drill down to the data they want, perhaps a few graphs here and there, and then extract selected data to an Excel file or a flat file for further analysis. As of now there are a handful of parameters...
0
4248
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET Applications and owner of Access Microsystems. Doug can be reached at doug@accessmicrosystems.com. --------------------------------------------------------------------------------
6
269
by: Tippy G | last post by:
My name is Glenn, I am an experienced VB5.0/6.0 programmer who is starting a new project using VB.NET. The project is simple but will be using a .mdb file for storing of data. Only one person will be accessing the database at one time and the database will be stored on a mapped shared folder. I have been reading on ADO.NET and am getting a little confused and wondering if I am am doing the right thing. The use of Data Adapters and...
20
1609
by: C# Beginner | last post by:
I'm currently creating a database class, which contains a member called Open(). With this method users can open different databases. When a user tries to open a database which happens to be secured with useraccounts (username, password etc), the user should be notifed to login. Now, in my opinion their are 3 ways to cope with situation: 1. Exit the method nicely with an errorcode (eg access denied, specify accountinformation and try...
15
1900
by: =?Utf-8?B?TWljaGVsIFBvc3NldGggW01DUF0=?= | last post by:
In my opinion rethrowing exceptions without providing anny extra information is a totall waste Examples : in my opinion wrong : A: Public sub DoSomeStuff() Try do it
1
1224
by: CProgrammer80 | last post by:
I am compiling 4 different programs, each using a lot of the same core functions and files. One of the programs requires access to a large third party library, the others do not. I have created an "options" structure suitable for all 4 programs. The way the options structure is filled out however can differ depending on the program which is to be used. Most of it is trivial stuff... "do I write to stdout?", etc. However, one of the...
4
1600
by: timmg | last post by:
I have an application were users evaluate records and based on the amount of money involved answer between 17 and a 120 questions on one of three response forms. I have a master list of question in one table and another that links the subset of questions to the particular form. When the user gets ready to answer the questions the app appends the questions to the answer table - all of which makes it easy to answer the questions within a...
0
10319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.