Good Day.
I have limited experience with SQL and quite a bit of experience with Access. I have been connecting to Access with ADO for some time now.
I recently ran into trouble when connected to a SQL database and attempting a write. What works against an access database isn't working here. I suspect it is a server side permissions problem, but my IT guy has been trying everything up to and including giving me owner rights and admin access.
Here is the connection string:
then the code
As mentioned in the notes above I can connect to the DB just fine. It only errors out when I try to update the recordset. The error is: RTE -2147217911 UPDATE permission denied on object 'prempl'
Am I simply missing something silly or ?
I have limited experience with SQL and quite a bit of experience with Access. I have been connecting to Access with ADO for some time now.
I recently ran into trouble when connected to a SQL database and attempting a write. What works against an access database isn't working here. I suspect it is a server side permissions problem, but my IT guy has been trying everything up to and including giving me owner rights and admin access.
Here is the connection string:
Code:
strMainConn = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist" & _
"Security Info=False;User Id=Matprogram;Password=Mpg8743;Data Source=CP03"
Code:
Set objRS = New ADODB.Recordset
Set objCon = New ADODB.Connection
objCon.Open strMainConn
strSQL = "SELECT * FROM prempl WHERE fendate = 1/1/1900 ORDER BY fname"
objRS.Open strSQL, objCon, adOpenKeyset, adLockOptimistic
Do While Not objRS.EOF
'RIGHT HERE IS MY PROBLEM
objRS("fname").Value = UCase(Trim(objRS.Fields("fname").Value))
objRS.Update
'IF I COMMENT THE ABOVE CODE EVERYTHING WORKS FINE TO READ THE DATABASE
frmM2M.cboEmployee.AddItem Trim(objRS.Fields("fname").Value) & ", " & Trim(objRS.Fields("ffname").Value) & " " & Trim(objRS.Fields("fmi").Value)
frmM2M.lstEmployee.AddItem objRS.Fields("fempno").Value
objRS.MoveNext
Loop
objRS.Close
Set objRS = Nothing
objCon.Close
Set objCon = Nothing
Am I simply missing something silly or ?