LSConnection.Update (Oracle table)

Hi All

I’m trying to update record set (oracle) using LSXLC, but one way it’s thorowing error, another way it’s duplicating records.

Exmaple :

Oracle Table Details as follows:

Employee_ID, First_Name, Last_Name, DESI

99999 , Robeen , Steave ,

77777 , Silver , Ron ,

code as follows:

Dim fldLst As New LCFieldList

Dim fld As  LCField

Set connect = New LCConnection("oracle")	



connect.Server = "DevelopmentServer"

connect.Userid = "abcde"

connect.Password = "abcde"

connect.Metadata ="testingfromln"

connect.Connect

connect.commitFrequency = 0 ' Only make commits at the end

connect.rollBackOnError = True ' If there is an error then rollback

connect.traceSQL = True ' Trace the SQL

If (connect.Execute({select * from testingfromln where Employee_ID=‘99999’},fldlst) = 0 ) Then

	Print "No Records Found"

	Exit Sub

End If







While (connect.Fetch(fldLst,1,1)>0) 

	Print fldlst.GetField(1).text(0)		

	fldlst.GetField(4).value="employee"

Wend





Print Cstr(connect.Update(fldLst,1,1))	connect.Disconnect

Print "disconnected"

When I run this above code it’s duplicating records in the oracle. example as follows

Employee_ID, First_Name, Last_Name, DESI

99999 , Robeen , Steave ,employee

99999 , Robeen , Steave ,employee

If i create table with Primary Key then i’m getting “Viloation” Error.

Please help me.

Thanks

Subject: LSConnection.Update (Oracle table)

Thanks. I have done this.