Hi
I would like to know if there is an an easy way to recover the entire SQL string sent to the SQL server built using ADO adparam methods.
I need to recover and assign to a variable the entire SQL string executed by objCmd.Execute below
Thanks
example
'Declare database objects
Dim objConn As New ADODB.Connection
Dim objCmd As New ADODB.Command
Dim objErr As ADODB.Error
'Establish a database connection using SQL server Authentication
objConn.Open "DSN=DSNname;UID=sa;PWD=password;DATABASE=DBna me"
'Check the state of the connection to ensure we are connected
If objConn.State = adStateOpen Then
'Set the Command object properties
Set objCmd.ActiveConnection = objConn
objCmd.CommandText = "spExportGroup"
objCmd.CommandType = adCmdStoredProc
'Set the Command object parameters
objCmd.Parameters.Append _
objCmd.CreateParameter("LastName", adVarChar, adParamInput, 80, LastName)
objCmd.Parameters.Append _
objCmd.CreateParameter("FirstName", adVarChar, adParamInput, 80, FirstName)
objCmd.Parameters.Append _
objCmd.CreateParameter("CompanyName", adVarChar, adParamInput, 80, CompanyName)
objCmd.Parameters.Append _
objCmd.CreateParameter("GuestType", adVarChar, adParamInput, 20, GuestType)
objCmd.Parameters.Append _
objCmd.CreateParameter("EmailID", adVarChar, adParamInput, 250, EmailID)
objCmd.Parameters.Append _
objCmd.CreateParameter("SeminarID", adVarChar, adParamInput, 20, SeminarID)
objCmd.Parameters.Append _
objCmd.CreateParameter("PropertyCode", adVarChar, adParamInput, 20, PropertyCode)
'Execute the Command object
objCmd.Execute