Is AR_CWP a table or a view? If it is a view, is it updatable? And do you have update authority to it?
John Viescas, author "Building Microsoft Access Applications" "Microsoft Office Access 2003 Inside Out" "Running Microsoft Access 2000" "SQL Queries for Mere Mortals" http://www.viescas.com/ -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of programphandhoe Sent: Monday, August 22, 2005 4:04 AM To: [email protected] Subject: [ms_access] UPDATING ORACLE RECORDSET FAILED Hi Guys, i'm trying to update some of my record in my Oracle Database, but failed.The error message says that the provider may not support updating or locktype does not support updating. PLEASE HELP ME! here is the code: Dim my_Conn As ADODB.Connection Dim rs As ADODB.Recordset Set rstns = CurrentDb.OpenRecordset("select tns from TTNS") tnse = rstns("tns") strConnString = "Provider=MSDAORA.1;User ID=sap;Data Source=" & tnse & ";Persist Security Info=False;Password=sap;" 'ORACLE SIP DJP tested ok Set my_Conn = New ADODB.Connection my_Conn.Open strConnString Set RSLOKAL = CurrentDb.OpenRecordset("select * from STATUS") If RSLOKAL.BOF Then Exit Sub Else Do While Not RSLOKAL.EOF Set rs = New ADODB.Recordset strsql = "Select * from AR_CWP where KD ='" & Me.KODE &"'" rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open strsql, my_Conn, , , adCmdText If rs.BOF Then Else rs.Fields("NO") = Me.NOB rs.Fields("KDX") = Me.KDX rs.Update rs.Close Set rs = Nothing End If RSLOKAL.MoveNext Loop Me.status = Chr(13) & Chr(10) & Chr(13) & Chr(10) & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ "FINISH..." End If ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hkhfar2/M=362131.6882499.7825260.1510227 /D=groups/S=1705115370:TM/Y=YAHOO/EXP=1124708644/A=2889191/R=0/SIG=10r90krvo /*http://www.thebeehive.org ">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life - brought to you by One Economy</a>.</font> --------------------------------------------------------------------~-> Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> <font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12h87qefc/M=362335.6886445.7839731.1510227/D=groups/S=1705115370:TM/Y=YAHOO/EXP=1124720021/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/">In low income neighborhoods, 84% do not own computers. At Network for Good, help bridge the Digital Divide!</a>.</font> --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/ms_access/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
