Why is the ActiveX object being used?

Consider the following code:
<%
DimloConn, lsSQL, loRs
Set loConn = CreateObject(“ADODB.Connection”)
loConn.Open(“DSN=myDSN;UID=something;PWD=Something;”)
lsSQL = “INSERT INTO tMembers (MemberName) VALUES (‘Manohar’);” &_
“SELECT @@IDENTITY AS NewID;”
Set loRs = loConn.Execute(lsSQL)
Set loRs = loRs.NextRecordSet()
IIID = loRs.Fields(“NewID”).value
loConn.Close()
Set loConn = Nothing
%>
Why is the ActiveX object being used?

Consider the following code:
<%
DimloConn, lsSQL, loRs
Set loConn = CreateObject(“ADODB.Connection”)
loConn.Open(“DSN=myDSN;UID=something;PWD=Something;”)
lsSQL = “INSERT INTO tMembers (MemberName) VALUES (‘Manohar’);” &_
“SELECT @@IDENTITY AS NewID;”
Set loRs = loConn.Execute(lsSQL)
Set loRs = loRs.NextRecordSet()
IIID = loRs.Fields(“NewID”).value
loConn.Close()
Set loConn = Nothing
%>
Why is the ActiveX object being used?

A.
To access the client so a new record can be added.

B.
To manipulate the database.

C.
To represent a table in the database so a new record can be added.

D.
To open a link with the database so a new record can be added.



Leave a Reply 0

Your email address will not be published. Required fields are marked *