INFO: "??? ???? ???????? ??? ???????" ???? ????? ?????

?????? ????????? ?????? ?????????
???? ???????: 214459 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

??? ??????? ?????? ?????? ActiveX (ADO) ??? ????? ???????? ??? ????? ???? ?? ???? ????? ????? ???????:
??? ??? ??????? 2147217887 (80040e21):
[Microsoft][?????? ????? ???? SQL ODBC] ?? ??? ??????? ???? ????????.

??????? ????

???? ?? ???? ??? ????? ??? ????? ????? ??? ????? ?? ?????? ???????? ?????? ????? ADODB ??? ??? ??? ????? ?? ??? ???? ????????.

??? ???? ??????? ???????? SQL Server 7.0 ????? ????? ???? ?? ????? ?????? pubs (????????):
   CREATE PROCEDURE GetEmployeeInfo (@thedate datetime, @NumEmployees int output)AS 
       SELECT @NumEmployees =  count(*) FROM EMPLOYEE WHERE hire_date < @thedate
   GO
				
????? ??? ??????? ?????? ????? ????? ?? ????? ??? ???? ???? ??? ??? ???????? ????? ?? ??????? ?? ???? ??????? ??? ????? ????. ??? ????? ??????? ??? ??????? ?????? ?????? ?? ??? ????? ??? ???????? ??? ?????? ????????? ?? ????? ?????.

???? ????? ????? ADO ???????? ??????? ??????. ??? ????? ?????? ?????? ?? Visual Basic.
Private Sub MySubroutine()
Dim dbConnection As ADODB.Connection
Dim dbCommand As ADODB.Command

Set dbConnection = New ADODB.Connection
Set dbCommand = New ADODB.Command

Dim DSNNAME As String
Dim USERNAME As String
Dim PASSWORD As String

DSNNAME = "Pubs"
USERNAME = "sa"
PASSWORD = ""

dbConnection.Open DSNNAME, USERNAME, PASSWORD
dbCommand.ActiveConnection = dbConnection

Dim TheDate As Date
TheDate = Now

dbCommand.CommandText = "GetEmployeeInfo"
dbCommand.CommandType = adCmdStoredProc
dbCommand.Parameters.Append dbCommand.CreateParameter("@thedate", adDBDate, adParamInput, 0, TheDate)
dbCommand.Parameters.Append dbCommand.CreateParameter("@NumEmployees", adInteger, adParamOutput, 0)
dbCommand.Execute

Dim strTheString As String
strTheString = "There are " & dbCommand.Parameters("@numemployees") & " employees who were hired before " & TheDate
MsgBox strTheString, vbOKOnly, "Demonstration"
End Sub
				
??? ????? ????? ???????? ???????? ???? ???? ??? ?????:
??? ??? ??????? 2147217887 (80040e21):
[Microsoft][?????? ????? ???? SQL ODBC] ?? ??? ??????? ???? ????????.
???? ??? SQL Server ?? ????? ??? ???????? adDBDate. ?????? ??? ???????? ?? ?????? ??? ?????? ??????? @ theDate ??? adDBTimeStamp.

?????? ????? ????? ????? ?????? ?? ???????? ???????? ?? ????? ???? ??????? ??????? Parameters.Refresh ????? ?????. ???? ??????? ??? ??????? ????? ????? ??????? ????? ?? ?????? ??????? ?????? ??????? ?????? ?? ????? ??????? ????? Parameters.Refresh ??? ?? ??? ???????? ????????.

???????

???? ???????: 214459 - ????? ??? ??????: 04/????? ???????/1422 - ??????: 1.0
????? ???
  • Microsoft ActiveX Data Objects 2.0
  • Microsoft ActiveX Data Objects 2.1 Service Pack 2
  • Microsoft ActiveX Data Objects 2.5
  • Microsoft ActiveX Data Objects 2.6
  • Microsoft ActiveX Data Objects 2.7
????? ??????: 
kbmt kbinfo kbstoredproc KB214459 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????214459
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com