The code below works fine I just wanted to ask if I take out 2 lines of code the code still works the same but should I take it out or keep it and what does it do ?
Thanks for the help in advance.
' OPEN DATABASE
dim objConn,objRS,objTRS,objUnit
'----Do I need this ? ----> Const adCmdText = &H0001
Set objConn = Server.CreateObject("ADODB.Command")
objConn.ActiveConnection = "Driver={SQL Server};Server=MSSQLSrv;Database=DbTest;UID=blablabala;PWD=blablabala"
'----Do I need this ? ----> objConn.CommandType = adCmdText
strQuery = "SELECT USERNAME,PASSWORD from CUSTOMERS where EMAIL=?"
objConn.CommandText=strQuery
objConn.Parameters(0) = Request.QueryString("email")
SET objRS = objConn.execute(strQuery)
line 1 and 2 are working together
The CommandType can be a Stored Procdure. You can set/define your own way directly through the SP and then call (Using the SqlCommand) so there is no need to define UserDefinedFunction.
See http://www.w3schools.com/ado/prop_comm_commandtype.asp for the complete listing of all the CommandTypeEnum Values
Hope this helps…