ASP trial Stored Procedure

Source: Internet
Author: User
Function getuserid (onlinesn)

Onlinesn = Replace (onlinesn ,"'","''")
Set sqlcmd = server. Createobject ("ADODB. Command ")
'Recordset and command objects can all be connected to the connection object through the activeconnection attribute.
Sqlcmd. activeconnection = Conn
Sqlcmd. commandtext = "login_online"
Sqlcmd. commandtype = adw.storedproc

Set param1 = sqlcmd. createparameter ("@ onlinesn", advarchar, adparaminput, 100, onlinesn)
'Param1 = server. Createobject ("ADODB. parameter ")
'Param1. type = advarchar
'Param1. ction = adparaminput


Sqlcmd. Parameters. append (param1)

Set param2 = sqlcmd. createparameter ("@ logintime", addbtime, adparaminput, now)
Sqlcmd. Parameters. append (param2)
VAU = ""
Set param3 = sqlcmd. createparameter ("@ userid", advarchar, adparamoutput, 100, Vau)
Sqlcmd. Parameters. append (param3)

Sqlcmd. Execute
Getuserid = param3.value

Set sqlcmd = nothing

End Function

Note: add an adovbs. inc constant to the corresponding file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.