I create a new connection but I get it as READ-ONLY

  • Thread starter Miguel Angel Diaz via AccessMonster.com
  • Start date
M

Miguel Angel Diaz via AccessMonster.com

Hi, I want acces to a another DB in my sql server so i wrote the code below.

But I get the info as NOT UPDATABLE, as READ-ONLY.

Why?
Can you help? pls

connectStr = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=TipoCambioSQL;" & _
"Data Source=(local);"
Set cnnNwind = New ADODB.Connection

cnnNwind.Open connectStr

strSQL = "tblTipos"
With rstNwind
.ActiveConnection = cnnNwind
.CursorType = adOpenDynamic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
End With
rstNwind.Open strSQL, , , , adCmdTable

Set Me.Recordset = rstNwind
Me.UniqueTable = "tblTipos"
 

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