Using ADODB.Recordset to a DB with Workgroup Security

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
 
S

Scott McDaniel

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
 
B

Barmaley

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
 
B

Barmaley

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"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top