PermaLink DB2 LSX problem - pt.5: Sample LSX doesn't work either08/02/2004
DB2
I decided to take the Help Desk up on their offer, and created a new agent that runs the sample code provided in the LSX Examples db. To eliminate the possibility of coder error, all I did was change the database, username and password settings in the code. I ran the code, and it still generated the same error.

08/02/2004 01:44:55 PM Agent message: Error: [IBM][CLI Driver][DB2/SUN] SQL0031C File "C:\32CAE614\bnd\db2clish.bnd" could not be opened., Connector 'db2', Method -Catalog [Metadata]- (-31)

Heavy Sigh

As before, the code I'm trying to run is viewable by clicking on Read More below. Option Public Option Declare Uselsx "*LSXLC" %INCLUDE "lsconst.lss" Sub Initialize Dim session As New LCSession Dim connect As New LCConnection ("order") Dim cnt As Long Dim conFldLst As New LCFieldList (1, LCFIELDF_TRUNC_DATA + LCFIELDF_TRUNC_PREC) Dim conFld As New LCField (LCTYPE_TEXT, 1) Dim field As New LCField (LCTYPE_TEXT, 1) Dim wintitle As String Dim result As String Dim mb As Long On Error Goto ErrorHandler wintitle = "Catalog Example" connect.ConnectorName = "db2" REM this section assigns the appropriate properties to connect to DB2 connect.Database = "SOMEDB" connect.Userid = "user" connect.Password = "password" REM connect to DB2 connect.Connect REM now perform the catalog action - in this case for metadata cnt = connect.Catalog(LCOBJECT_METADATA,conFldLst) If (cnt = 0) Then mb = MB_IconInformation + MB_OK Messagebox "No metadata was found.", mb, wintitle End Else REM fetch the results cnt = connect.Fetch(conFldLst, 1, 1) End If REM now get each field and build a list using the variable called result REM this list can get very large depending on how many tables this DB2 database has Set field = conFldLst.GetField(1) result = "" While ((session.status = LCSUCCESS) And (cnt >0)) result = result + field.text(0) + "," cnt = connect.Fetch(conFldLst, 1, 1) Wend Print "Here is the metadata: " & result, wintitle End ErrorHandler: Dim Msg As String Dim MsgCode As Long Dim status As Integer If session.status <> LCSUCCESS Then status = session.GetStatus (result, msgcode, msg) Else result = "Error " & Err() & ": " & Error() End If Messagebox (result), mb, wintitle End End Sub
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