PermaLink Rollback action using DB2 LC LSX - pt. 5: can't update multiple tables using the ODBC2 LSX?04/05/2005
LSX
Roughly three weeks ago, I thought I had my problem with needing to rollback all previous LSX transactions solved. Using the ODBC2 LSX worked fine when I was testing with only one table. However, when my code attempts to update a second table, I get this error:
LSX Error: Status 12552
LSX Error: Err = 12552
LSX Error Line 133
LSX Error: Status Text = Error: Field mapping failed due to a missing field,  Connector 'odbc2',  Method -Insert-
I used the LCConnection.Catalog method to verify all of the fields in my destination table, and everything was correct (click on the Read More link below to see this code). When I switch my code to use the DB2 LSX instead, the code runs fine. However, the reason why I switched to the ODBC2 LSX was so that my agent would have the capability to perform a rollback in the event an error was encountered. Hmm. Guess I'll need to enter another Help Desk ticket for support.
Dim conFldLst As LCFieldList
Dim nameField As LCField
Dim ownerField As LCField
Dim commentField As LCField
Dim datatypeField As LCField
	
Dim dt As String
	
Set conFldLst = New LCFieldList
	
If (con.Catalog ( LCOBJECT_FIELD, conFldLst ) = 0) Then
	Error 9002, "No fields were found"
Else
	' fetch the results 
		
	Set nameField = conFldLst.GetField(1)
	Set ownerField = conFldLst.GetField(2)
	Set commentField = conFldLst.GetField(3)
	Set datatypeField = conFldLst.GetField(4)
		
	While (con.Fetch (conFldLst) > 0)
			
		Print "name:     " & nameField.text(0)
			
		Print "owner:     " & ownerField.text(0)
			
		Print "comment:     " & commentField.text(0)
			
		Select Case ( datatypeField.Value (0) )
		Case LCTYPE_CURRENCY
			dt = "currency"
		Case LCTYPE_DATETIME
			dt = "date/time"
		Case LCTYPE_INT
			dt = "int"
		Case LCTYPE_FLOAT
			dt = "float"
		Case LCTYPE_NUMERIC
			dt = "numeric"
		Case LCTYPE_TEXT
			dt = "text"
		Case LCTYPE_BINARY
			dt = "binary"
		Case Else
			dt = "unknown"
		End Select
		
		Print "Datatype = " & dt & ", value = " & dataTypeField.Text (0)
			
	Wend
		
End If

Comments :v
No comments.
Credits
NuTechs Powered by Domino
Search
Calendar
February 2012
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Monthly Archive
Get Real, Detroit!
Real Detroit Weekly
SWARM
Service
With
A
Rapid
Motion


-- old Rally's Hamburgers credo
Lotus Domino ND6 RSS News Feed RSS Comments Feed Podcast Feed Geo URL netcraft RSS Validator Lotus Geek Chris. A. Brandlehner Open Notes Picture Database OpenNTF CoComment Integrated BlogSphere
By Category
The BlogRoll
About
Contact Me
Contact me, Michael Sobczak, using this e-mail address:

my first initial my last name at Yahoo dot com
Recent Entries
No Recent Blogs
Powered by
Blogsphere