Indices con VB y sql server 2000
Tengo el siguiente código:
Dim UserName As String
Dim Password As String
Dim ServerName As String
Dim DBName As String
UserName = ""
Password = ""
ServerName = "PORTATILTARELA"
DBName = "Northwind"
' Set connection properties.
cn.ConnectionTimeout = 25 ' Set the time out.
cn.Provider = "SQLOLEDB.1" ' Specify the OLE DB provider.
cn.Properties("Data Source").Value = ServerName ' Set SQLOLEDB connection properties.
cn.Properties("Initial Catalog").Value = DBName ' Set SQLOLEDB connection properties.
cn.Properties("Integrated Security").Value = "SSPI" ' Set SQLOLEDB connection properties.
'cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=PORTATILTARELA"
' Change mousepointer while trying to open database.
Screen.MousePointer = vbHourglass
' Open the database.
cn.Open
' Open the Recordset.
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select * from Employees", cn, adOpenKeyset, adLockPessimistic
' Move to the first record and display the data.
rs.MoveFirst
FillDataFields
MsgBox "¿Soporta índices? : " & rs.Supports(adIndex)
Al llegar al msgbox, éste me indica que no soporta índices, pero los permisos de la tabla están establecidos y la tabla tiene su correspondiente índice. ¿Que es lo que falla? Gracias por vuestra atención.
Dim UserName As String
Dim Password As String
Dim ServerName As String
Dim DBName As String
UserName = ""
Password = ""
ServerName = "PORTATILTARELA"
DBName = "Northwind"
' Set connection properties.
cn.ConnectionTimeout = 25 ' Set the time out.
cn.Provider = "SQLOLEDB.1" ' Specify the OLE DB provider.
cn.Properties("Data Source").Value = ServerName ' Set SQLOLEDB connection properties.
cn.Properties("Initial Catalog").Value = DBName ' Set SQLOLEDB connection properties.
cn.Properties("Integrated Security").Value = "SSPI" ' Set SQLOLEDB connection properties.
'cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=PORTATILTARELA"
' Change mousepointer while trying to open database.
Screen.MousePointer = vbHourglass
' Open the database.
cn.Open
' Open the Recordset.
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.Open "select * from Employees", cn, adOpenKeyset, adLockPessimistic
' Move to the first record and display the data.
rs.MoveFirst
FillDataFields
MsgBox "¿Soporta índices? : " & rs.Supports(adIndex)
Al llegar al msgbox, éste me indica que no soporta índices, pero los permisos de la tabla están establecidos y la tabla tiene su correspondiente índice. ¿Que es lo que falla? Gracias por vuestra atención.