0

I am new to ASP. I've been coding with PHP for about 10 years now but just started ASP.

Here is my code:

Set rs = CreateObject("ADODB.Recordset") 
strStoredProcedure = "SP_AddHPOrderItem'" & empIdent & "'" 
rs.Open strStoredProcedure,strConnect, adopenForwardOnly, adlockoptimistic, adcmdtext

I am assuming that the variable RS("styleDesc") is coming from this query as I have found no reference to an RS, only rs. Not sure if variables are case sensitive in ASP.

My question is, is strStoredProcedure a function? Because I don't understand how this query can be made with the variable assigned the way it is.

How does SP_AddHPOrderItem'" & empIdent & "' constitute a query? There are no selects, inserts, updates, or anything like that.

If an expert could point me in the right direction if would be much appreciated.

1
  • 3
    Is there a specific reason you are starting asp, and not perhaps asp.net? Commented Jul 1, 2011 at 22:17

1 Answer 1

1

The first statement of a SQL batch can be a stored procedure name; if so, SQL Server will execute it even if it's not prefixed with exec. So the net effect is if you send this to SQL Server:

exec SP_AddHPOrderItem 'empIdent'
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.