Using ADODB.Recordset to a DB with Workgroup Security

  • Thread starter Thread starter Barmaley
  • Start date Start date
B

Barmaley

I have front end Access DB with Workgroup Security and back end on SQL.
I want to use MS Word form and check (connecting to tables) if username
exist.

Will Workgroup Security prevent me to connect to the tables and if yes, how
can I work arout it?

Thank you
 
Do you mean your data is stored in client/server type db, like MSSQL or
MySQL? If so, then Access workgroup security has nothing to do with that.

Are you wanting to connect from the Word doc? You'd do something like this:

Dim con As New ADODB.Connection
Dim rst As New ADODB.Recordset

con.Open "SomeValidConnectStringDependingOnYourServer"
rst.Open "YourSQL", con

ADO connection source:
http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMicrosoftJet
 
The reason why it workgroup security was an issue, because I was connecting
to MDB file that had linked tables to MS SQL server.
However, your link provided me with information (syntax) how to connect to
MDB with workgroup security.

This perhaps not a best method, but it was only one I knew.

Thank you for your help
 
Thanks again,

I just wated to post solution for direct connection to SQL I used from link
you provided:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For a Trusted Connection
oConn.Open "Provider=sqloledb;" & _
"Data Source=myServerName;" & _
"Initial Catalog=myDatabaseName;" & _
"Integrated Security=SSPI"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
Back
Top