How, err, does ADO work? 
Author Message
 How, err, does ADO work?

I'm pretty familiar with SQL 7 SQL statements and understand how it all
hangs together when issuing T-SQL statements. But how ADO works (or not) is
a bit of a blank book for me.

Specifically, what *actually* happens when an addnew is executed? Does ADO
pass a INSERT SQL statement to SQL or is there some other backdoor

Is there any way of debugging the messages passing backwards and forwards
between ADO and SQL Server?

The reason I'm asking is concerning my previous post about why ADO fails to
return the identity of a new record when using a joined table and server
side cursors. If I could see what was going on behind the scenes, I might be
able to get some idea why it's failing.

Cheers, Rob.



Tue, 31 Aug 2004 21:48:09 GMT  
 How, err, does ADO work?
Hi,

If you want to see how ADO communicates with SQL Server in
each particular case, then you can use SQL profiler. That
tool comes with SQL Server and allows you to trace all
communication between client and server. When you execute
some code, which makes some changes in ADO recordset, then
you will see what is going on on server side

Val

Quote:
>-----Original Message-----
>I'm pretty familiar with SQL 7 SQL statements and

understand how it all
Quote:
>hangs together when issuing T-SQL statements. But how ADO
works (or not) is
>a bit of a blank book for me.

>Specifically, what *actually* happens when an addnew is
executed? Does ADO
>pass a INSERT SQL statement to SQL or is there some other
backdoor
>mechanism? And how does it get back the identity? Is it
passed back using

>Is there any way of debugging the messages passing

backwards and forwards
Quote:
>between ADO and SQL Server?

>The reason I'm asking is concerning my previous post

about why ADO fails to
Quote:
>return the identity of a new record when using a joined
table and server
>side cursors. If I could see what was going on behind the
scenes, I might be
>able to get some idea why it's failing.

>Cheers, Rob.

>.



Tue, 31 Aug 2004 22:18:08 GMT  
 How, err, does ADO work?
and yes it generates appropriate SQL statements (there is no 'backdoor'
technology).  If you want to know 'how it really works' use the profiler
PLUS use something like VB in step mode to look at the Recordset object as
it is stored in memory.  From there you can go to MSDN lib to see additional
details.  No real magic there.

Quote:
> Hi,

> If you want to see how ADO communicates with SQL Server in
> each particular case, then you can use SQL profiler. That
> tool comes with SQL Server and allows you to trace all
> communication between client and server. When you execute
> some code, which makes some changes in ADO recordset, then
> you will see what is going on on server side

> Val

> >-----Original Message-----
> >I'm pretty familiar with SQL 7 SQL statements and
> understand how it all
> >hangs together when issuing T-SQL statements. But how ADO
> works (or not) is
> >a bit of a blank book for me.

> >Specifically, what *actually* happens when an addnew is
> executed? Does ADO
> >pass a INSERT SQL statement to SQL or is there some other
> backdoor
> >mechanism? And how does it get back the identity? Is it
> passed back using

> >Is there any way of debugging the messages passing
> backwards and forwards
> >between ADO and SQL Server?

> >The reason I'm asking is concerning my previous post
> about why ADO fails to
> >return the identity of a new record when using a joined
> table and server
> >side cursors. If I could see what was going on behind the
> scenes, I might be
> >able to get some idea why it's failing.

> >Cheers, Rob.

> >.



Tue, 31 Aug 2004 22:37:42 GMT  
 How, err, does ADO work?
Looking at the dynamic properties of the recordset and fields can VERY be
enlightening too.

For example, dynamic properties for a column "basetablename" &
"basecolumnname" appear blank when using read-only recordsets (because ADO
will not need them for updates later) and explains why certain settings use
less resources.

Other properties are built when switching between Client and Server cursors
& providers.

You can see all of these properties in the AdoAnywhere browser obtainable
from http://www.adoanywhere.com/download/aaBrowse2_7.zip

I use another product that traces the COM calls of the provider too..

--
Michael Collier Bsc (Hons)

Interactive ADO Browser Trial  www.adoanywhere.com/cnet
Free ADO Browser (FAB)  www.adoanywhere.com/fab
Home Page www.adoanywhere.com

--


Quote:
> I'm pretty familiar with SQL 7 SQL statements and understand how it all
> hangs together when issuing T-SQL statements. But how ADO works (or not)
is
> a bit of a blank book for me.

> Specifically, what *actually* happens when an addnew is executed? Does ADO
> pass a INSERT SQL statement to SQL or is there some other backdoor
> mechanism? And how does it get back the identity? Is it passed back using

> Is there any way of debugging the messages passing backwards and forwards
> between ADO and SQL Server?

> The reason I'm asking is concerning my previous post about why ADO fails
to
> return the identity of a new record when using a joined table and server
> side cursors. If I could see what was going on behind the scenes, I might
be
> able to get some idea why it's failing.

> Cheers, Rob.



Wed, 01 Sep 2004 00:17:27 GMT  
 How, err, does ADO work?
Use SQL Server profiler to see the actual statements being sent to SQL
Server by your code.
Also, if you want to have better control over what is sent to SQL Server,
don't rely on the Recordset object to insert records or delete. Instead,
use your own Stored Procedures in SQL Server and call them with the Command
Object in ADO.

Hope this helps,

Ayax Vargas, MCSD, MCDBA
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.

Are you secure?  For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
--------------------

| Subject: How, err, does ADO work?
| Date: Fri, 15 Mar 2002 13:48:09 -0000
| Lines: 21
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

| Newsgroups: microsoft.public.vb.database.ado
| NNTP-Posting-Host: news.informed-direct.com 193.129.245.163
| Path: cpmsftngxa08!cpmsftngxa06!cpmsftngxa07!tkmsftngp01!tkmsftngp05
| Xref: cpmsftngxa08 microsoft.public.vb.database.ado:64757
| X-Tomcat-NG: microsoft.public.vb.database.ado
|
| I'm pretty familiar with SQL 7 SQL statements and understand how it all
| hangs together when issuing T-SQL statements. But how ADO works (or not)
is
| a bit of a blank book for me.
|
| Specifically, what *actually* happens when an addnew is executed? Does ADO
| pass a INSERT SQL statement to SQL or is there some other backdoor
| mechanism? And how does it get back the identity? Is it passed back using

|
| Is there any way of debugging the messages passing backwards and forwards
| between ADO and SQL Server?
|
| The reason I'm asking is concerning my previous post about why ADO fails
to
| return the identity of a new record when using a joined table and server
| side cursors. If I could see what was going on behind the scenes, I might
be
| able to get some idea why it's failing.
|
| Cheers, Rob.
|
|
|
|



Wed, 01 Sep 2004 00:35:01 GMT  
 How, err, does ADO work?

Quote:
> use your own Stored Procedures in SQL Server and call them with the
Command
> Object in ADO.

But I'm guessing that with this method, I'll have to refresh the
corresponding recordset for the new record to be visible (we're not using
dynamic)?

Because of all the quirks with ADO, we're going to modify our record form
navigation system to do it in a completely different way but that'll have to
wait for the next version.

Cheers, Rob.



Wed, 01 Sep 2004 23:22:24 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. ADO thinks DBMS is done, but DBMS ain't done

2. Err.Raise doen not work in the following scenario

3. why Err.Raise doesn't work within even procedure

4. Err.Raise doen not work in the following scenario

5. Err.Raise doen not work in the following scenario

6. err 3028 in ado.connection open method

7. Err while calling Oracle Stored function via ADO/ASP

8. ADO RDO can't create object err 429

9. ADO err with trans begin/commit ?

10. Want to deal with errors at stored proc level, but ado errs out regardless

11. ADO/ActiveX err 429 on web page

12. Refresh/Requery don't seem to work while doing file I/O

 

 
Powered by phpBB® Forum Software