Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2005

Tip: Looking for answers? Try searching our database.

Help with JET_SCHEMA_USERROSTER

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JLuis Estrada - 26 May 2005 17:10 GMT
  Its is possible to use it with MSADO 2.8?

'coz I saw and sample, but it use 2.6.

does anyone knows about it?
Douglas J. Steele - 27 May 2005 00:24 GMT
AFAIK, it works the same in 2.8

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>   Its is possible to use it with MSADO 2.8?
>
> 'coz I saw and sample, but it use 2.6.
>
> does anyone knows about it?
JLuis Estrada - 27 May 2005 14:37 GMT
I triedto use it on mi App, but it always return -1 in the .RecordCount,
anyone know why.

I run the same App with ADO 2.6 and it return perfectly all the user
connected to the DB.

> AFAIK, it works the same in 2.8
>
[quoted text clipped - 3 lines]
>>
>> does anyone knows about it?
Douglas J. Steele - 28 May 2005 00:36 GMT
Post whatever code you're using.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I triedto use it on mi App, but it always return -1 in the .RecordCount,
>anyone know why.
[quoted text clipped - 9 lines]
>>>
>>> does anyone knows about it?
JLuis Estrada - 30 May 2005 16:11 GMT
Private Function ComprobarConexion() As Boolean
  Dim Cn As New ADODB.Connection, Rs As ADODB.Recordset

  Const JET_SCHEMA_USERROSTER As String =
"{947bb102-5d43-11d1-bdbf-00c04fb92675}"

  Cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Trim(RutasSoftal.Db) & ";Persist Security Info=False"
  a = Cn.State
  Set Rs = Cn.OpenSchema(adSchemaProviderSpecific, , JET_SCHEMA_USERROSTER)

  ComprobarConexion = Rs.RecordCount > 1

  Rs.Close: Set Rs = Nothing
  Cn.Close: Set Cn = Nothing

End Function

The problem is that .RecordCount always return -1.

I use the MSADO 2.8

> Post whatever code you're using.
>
[quoted text clipped - 11 lines]
>>>>
>>>> does anyone knows about it?
Douglas J. Steele - 30 May 2005 22:43 GMT
Sorry, I don't have an answer.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Private Function ComprobarConexion() As Boolean
>   Dim Cn As New ADODB.Connection, Rs As ADODB.Recordset
[quoted text clipped - 34 lines]
>>>>>
>>>>> does anyone knows about it?
Michel Walsh - 31 May 2005 13:38 GMT
Hi,

   Forward only cursor/recordset do not know and do not bother themselves
trying to know how many records are in the set. The recordset count
returns -1  (should it been better if it would return NULL? but then, the
property should be have been a variant, another source of problem).

Hoping it may help,
Vanderghast, Access MVP

> Sorry, I don't have an answer.
>
[quoted text clipped - 36 lines]
>>>>>>
>>>>>> does anyone knows about it?
JLuis Estrada - 31 May 2005 14:48 GMT
  So, thats an error from ADO?

  Well, I changed my code and did this:

Private Function ComprobarConexion() As Boolean
  Dim Cn As New ADODB.Connection, Rs As ADODB.Recordset
  Dim a As Integer

  Const JET_SCHEMA_USERROSTER As String =
"{947bb102-5d43-11d1-bdbf-00c04fb92675}"

  Cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Trim(RutasSoftal.Db) & ";Persist Security Info=False"
  a = Cn.State
  Set Rs = Cn.OpenSchema(adSchemaProviderSpecific, , JET_SCHEMA_USERROSTER)
  While Not Rs.EOF
     a = a + 1
     Rs.MoveNext
  Wend

  ComprobarConexion = a > 1

  Rs.Close: Set Rs = Nothing
  Cn.Close: Set Cn = Nothing

End Function

and It worked so well. Its not the best programming practice, but if works,
its  ok.

Tnx for your help

> Hi,
>
[quoted text clipped - 46 lines]
>>>>>>>
>>>>>>> does anyone knows about it?
Douglas J. Steele - 31 May 2005 23:14 GMT
You could probably use:

  Set Rs = Cn.OpenSchema(adSchemaProviderSpecific, , JET_SCHEMA_USERROSTER)
  Rs.MoveLast
  ComprobarConexion = Rs.RecordCount > 1

I wouldn't have expected it to work in ADO 2.6 and not in ADO 2.8.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>   So, thats an error from ADO?
>
[quoted text clipped - 79 lines]
>>>>>>>>
>>>>>>>> does anyone knows about it?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.