????? ??? ????????? SQL ?? OLE DB ???? ???????

?????? ????????? ?????? ?????????
???? ???????: 229564 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

???????

??? ????? "??? ????? ???? SQL ??? ????? ?????? ?????? Microsoft ActiveX (ADO) SQL Server" ? ?? ????? ????? ????? ??????? ??? ??????? ?? SQL Server 7.0:
?? ?? ??????? sp_setapprole ???? ????. ?????? ??? ??????? ????? ?? ?????????.
??? ??????? ?? SQL Server 2000 ?? ???? ????? ??? ???:
[DBNETLIB][ConnectionRead (WrapperRead()).]??? ??? ?? ???? ???????. ???? ?? ????? ???? ???????
???? ??? ????? ????? ??? ??????? sp_setapprole ??? ????? ADO ?? ????? ?? ???? ??????? OLE DB. ???? ??? ????? ?? ???? SQLOLEDB ?? SQL Server ODBC ?????? ???????.

???? ??????? ?? ??? ??????? ????? ????? ?? .Net SQL Server ???? ?????? ?? .Net OLE DB ???? ?????? ??? ????????? ?? ???? SQLOLEDB OLE DB. ??? ?????? ????? ??? ????? ?? ??? ????? ???? ??? ??? ?? ???? ??????? "? ???? ????? ????? ???????:
??? ??? ?? ???? ???????

?????

?? ??????? ?????? ??? ????? ??? ????? ?? ??? ????? ???? SQL Server, ?? ????? ????? ????? ???? ???? ???????. ????? ??? ???? ???????? ????? ???? ??? SQL Server ??? ??????? ?? ?????? ???? ????? ??? ?????? ?????? ?????????. ??? ???? OLE DB ???? ??????? ?????? ????? ???? ??? ?????? ? ???? ????? ??? ????? ??????? ??????? ????? ?????? ????? ????? ????? ???? ?????? ????? ???????? ?? ???? ??????? sp_setapprole ??? ????.

???? ??????

???? ?????? ??????? ????? OLE DB ??????? Pooling ?????? ADO ???? ???????. ????? ?????? ???? ?? ???? ????? "????? OLE DB = 2" ??? ????? ????? ADO ??? ?? ???? ???:
'For SQLOLEDB provider
 'strConnect = "Provider=SQLOLEDB;server=SQL7Web;OLE DB Services = -2;uid=AppUser;pwd=AppUser;initial catalog=northwind"

' For MSDASQL provider 
'strConnect = "DSN=SQLNWind;UID=Test;PWD=Test; OLE DB Services= -2"
				

???? ????? Pooling .Net SQL Server ???????? ???? ?????? ????? "Pooling = False" ??? ????? ???????.

??????? ????

???????? ???????? ??????? reproduces ?????:
Private Sub Command2_Click()
 Dim adoCn1 As ADODB.Connection
 Dim adoCn2 As ADODB.Connection

 Set adoCn1 = GetConnection
 
 Set adoCn2 = GetConnection
 Set adoCn2 = Nothing
 Set adoCn2 = GetConnection
 Set adoCn2 = Nothing
 Set adoCn2 = GetConnection  'Gives errors for both SQLOLEDB and ODBC
 Set adoCn2 = Nothing
End Sub

Private Function GetConnection() As ADODB.Connection
 Dim cn As ADODB.Connection
 Dim sSQL As String
 Dim strConnect As String

 Set cn = New ADODB.Connection
 
'For OLE DB provider
 strConnect = "Provider=SQLOLEDB;server=myServer;uid=AppUser;pwd=AppUser;initial catalog=northwind"

'Turn off Pooling ( all other services are enabled )
'strConnect = "Provider=SQLOLEDB;server=myServer;OLE DB Services= -2;uid=AppUser;pwd=AppUser;initial catalog=northwind"
 
 'For ODBC driver
 'strConnect = "DSN=SQLNWind;UID=Test;PWD=Test; "

'Turn off Pooling
'strConnect = "DSN=SQLNWind;UID=Test;PWD=Test; OLE DB Services= -2"

cn.ConnectionString = strConnect
cn.Open
 
 sSQL = "sp_setapprole 'order_entry', 'password'"
 cn.Execute sSQL
 Set GetConnection = cn
End Function
				

?????

??? SQL ??? ??????; ???????: "???? ? ????? ????? ???????"

????? ?? ????????? ??? ????? ????? OLE DB ???? ??????? ?????? "???? ?? ?????? Access ?????? Microsoft ?" ??? MSDN ??? ??????:
http://msdn2.microsoft.com/en-us/library/ms810829.aspx
?????? ??? ???? ?? ????????? ??? ????? ????? ????? ????? OLE DB ???? ????? OLE DB Readme.txt.

???????

???? ???????: 229564 - ????? ??? ??????: 27/????/1428 - ??????: 4.3
????? ???
  • Microsoft SQL Server 7.0 Standard Edition
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft Data Access Components 2.0
  • Microsoft Data Access Components 2.1
  • Microsoft Data Access Components 2.5
  • Microsoft Data Access Components 2.6
  • Microsoft Data Access Components 2.7
  • Microsoft Data Access Components 2.8
????? ??????: 
kbmt kbfaq kbpending kbprb KB229564 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????229564

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

 

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