|
-
Oct 16th, 2000, 05:50 AM
#1
Thread Starter
Lively Member
I have a database that I can connect to using the following but I want to be able to add records using the .AddNew command and it brings up an "Object or Providers not Capable of preforming requested operation " error.
Any ideas?
Simon
Dim UserCon As ADODB.Connection
Dim UserRs As ADODB.Recordset
Dim UserFld As ADODB.Field
Dim strSQLUser As String
Dim strUserDNS As String
strUserDNS = frmView.userdatasource.ConnectionString
Set UserCon = New ADODB.Connection
UserCon.Open strUserDNS
strSQLUser = "SELECT userdata.viewpic, userdata.viewtip, userdata.viewupdate" & _
" FROM userdata" & _
" WHERE userdata.userlogin = " & Chr(39) & getusr() & Chr(39) & Chr(59)
'frmSearch.mmissdatasource.RecordSource = strSQLstatus & adCmdText
Set UserRs = New ADODB.Recordset
UserRs.CursorType = adOpenForwardOnly
UserRs.Open strSQLUser, UserCon, , , adCmdText
If UserRs.EOF = False Then
'For Each UserFld In UserRs
frmView.mipicss.Checked = UserRs("ViewPic")
frmView.miview.Checked = UserRs("ViewTip")
frmView.miupdate.Checked = UserRs("ViewUpdate")
'Next
Else
'UserRs.MoveLast
UserRs.AddNew
' UserRs("userlogin") = getusr()
' UserRs("viewpic").Value = True
' UserRs("viewtip").Value = True
' UserRs("viewupdate").Value = False
' UserRs.Update
End If
UserRs.Close
Set UserRs = Nothing
UserCon.Close
Set UserCon = Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|