ActiveX Data Objects: Difference between revisions

Content deleted Content added
P1ayer (talk | contribs)
m Update syntaxhighlight tags - remove use of deprecated <source> tags - BOT in trial - BRFA
Line 70:
Here is an [[Active Server Pages|ASP]] example using ADO to select the "Name" field, from a table called "Phonebook", where a "PhoneNumber" was equal to "555-5555".
 
<sourcesyntaxhighlight lang=vb>
dim myconnection, myrecordset, name
set myconnection = server.createobject("ADODB.Connection")
Line 83:
set myrecordset = nothing
set myconnection = nothing
</syntaxhighlight>
</source>
 
This is equivalent to the following ASP code, which uses plain SQL instead of the functionality of the Recordset object:
<sourcesyntaxhighlight lang=vb>
dim myconnection, myrecordset, name
set myconnection = server.createobject("ADODB.connection")
Line 92:
set myrecordset = myconnection.execute("SELECT Name FROM Phonebook WHERE PhoneNumber = '555-5555'")
name = myrecordset(0)
</syntaxhighlight>
</source>
 
==Software support==