adodb vs ado.net

A

Aleks Kleyn

At this time my code use ODBC and adodb to access database. Working with win
vista i discovered that way i cannot work with SQL server. it is not clear
this is bug or Microsoft suppose to give priority to ado.net. The same time
my friend told me that Microsoft does not recomend to use ado.net. It sounds
confusing. I expected that ado.net can help to improve responce time from
database. Also ado.net simplify work with hierarhical recordset (good
alternative to left join with multiple child records).
Aleks
 
B

Ben Rush

I would highly question your friend's statement that Microsoft "does not"
recommend using ADO.Net; every PDC and TechEd I've gone to for the past
four/five years has talked about using ADO.Net, and I've rarely heard ODBC
come up (at least, clearly not as often as ADO.Net).

....but what, exactly, is your question?
 
A

Aleks Kleyn

There will be a lot of questions. I designed project using ado.net. First,
how i can estimate increase in memory if I read table from database.
Another is little more sophisticated. Assume I use tables A and B (they may
be different views of the same table from database, but this is not
important). I can statically establish only one relationship between A and B
which allows read in B child rows. But in reality it may be different
relationship between A and B, To implement them I need to create separate
tables and double read the same data from database. Can I establish
relationship dinamically or set dynamically property nested relation on and
off?
 
A

Aidy

Don't use ADODB. It probably doesn't work on Vista cos MS have not
installed it by default. You could download it and install it, but don't.
When working with .net you should only use ado.net.

To answer your question, yes you can relate two tables in ado.net. ADO.net
is a massive subject, best bet is to buy a book on it.
 
K

Kevin Spencer

Hi Aleks,
At this time my code use ODBC and adodb to access database. Working with
win vista i discovered that way i cannot work with SQL server. it is not
clear this is bug or Microsoft suppose to give priority to ado.net.

You're talking about 2 different technologies here: ODBC and ADODB. ODBC is
a technology that enables applications to connect to and talk to a wide
variety of databases using the same low level programming interface. It is
like a platform for creating device drivers for databases. And ODBC is
fully-supported by the .Net platform.

ADODB on the other hand is a COM object model for working with databases,
and it is not confined to working with ODBC. It can work with OLE DB as
well. But it is COM, and is not natively compatible with the .Net platform,
requiring Interop to use in a .Net application.
The same time my friend told me that Microsoft does not recomend to use
ado.net.It sounds confusing. I expected that ado.net can help to improve
responce time from database.

ADO.Net is simply a term for the .Net platform's native technology for
database interactivity in a .Net application. So, I would consider any
opinion expressed by your friend as suspect in the future, and would verify
anything this friend told me from a reliable source in the future. In fact,
since the friend told you that Microsoft has said this, see if you can find
anywhere in the Microsoft docs that says this. You will not.

ADO.Net can not be used with any .Net application without using interop.
Interop is costly in terms of processor and memory usage, and should be
avoided. So, if you're writing a .Net application, use ADO.Net. If you're
writing an unmanaged app, use ADODB or OLE DB.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
A

Aleks Kleyn

I meet today interesting problem. More exactly I know it for a long time,
but it was not crucial until today. I have few stored procedures which
return recordset. when they do not have parameters there is no problem to
create table adapter based on stored procedure. But when stored procedure
has parameters the wizard has place where I can list values for these
parameters, however there is no option to insert some infomation about
parameters. I can create query, but query returns only single value.

At home application I created few datasets with different functionality. The
main reason is that when dataset has a lot of tables it can easy move to the
top and I have to scrol a lot return to interesting for me point. May be it
gets more space. However when we come to asp.net it may be useful from next
point of view. If I know that some tables never change I can put them to
dataset which I will refer from application, not session. This will give
ability to read these data from database only once.

and the last question. If I have 2 datatables is it possible to create joint
query base on these datatables or I have to reread data from database again?
 
K

Kevin Spencer

I'm sorry, but I don't understand the questions.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
A

Aleks Kleyn

There are 3 questions.

1. How it is possible to set parameters of store procedure when I design
datatable in dataset. Designer offers to select stored procedure for view,
insert, update, delete. Only in case of delete I can give values for
parameters.

2. Is it good idea to keep dataset as application variable. In ORelly book
for asp author did not recomend to use database connection on application
level. But this point of view is not clear for me enough.

3. I can wrute
select * from A join B on A.id=B.idA
This reads data from database. Now Atable in dataset has data from table A
and similar Btable. Can I create table adapter or query which join data from
Atable and Btable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top