adCmdText

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I don't understand why adCmdText is used here by the previous code author.
Why use adCmdText cursor if there is not a stored procedure?

' // OPEN THE DATABASE
mySQL = "SELECT * FROM PROFILE ORDER BY AGENCY_PROFILE_ID"

Set con = Server.CreateObject("ADODB.Connection")
con.Open "SBDX","",""

' // GET ACES DATA
Set rst = Server.CreateObject("ADODB.Recordset")
rst.Open mySQL, con, adOpenStatic, adLockReadOnly, adCmdText
 
adCmdText means that the command text is a text (SQL) statement to be
interpreted by the database engine and *not* the name of a stored procedure.
If the command text were the name of a stored procedure, the correct command
type would be adCmdStoredProc. You can omit the command type argument, but
there is a small performance penalty as the database engine has to figure
out what the command type is.
 

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

Back
Top