开发者

ASP SQL Server query question

开发者 https://www.devze.com 2023-03-17 00:14 出处:网络
I am new to ASP. I\'ve been coding with PHP for about 10 years now but just started ASP. Here is my code:

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开发者_C百科 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.


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'
0

精彩评论

暂无评论...
验证码 换一张
取 消