If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > uniVerse data access problem

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-18-05, 14:49
myredstrat myredstrat is offline
Registered User
 
Join Date: Feb 2005
Posts: 5
uniVerse data access problem

I am a developer for a mid sized motorcycle parts distributor, I have been given the task of creating a new web presence for this company, and have been beating my head against a wall trying to work with the uniVerse database we have. It is very difficult to find documentarion/examples of using this product with visual basic 6. I have tried using some code from a pdf you put out (UniObjects Developers Guide version 10.0,from the ibm website) and it does not work. Here is my code:
Set WebContentFile = uvSess.OpenFile("NAV")
Set theList = uvSess.SelectList(0)


theList.Select WebContentFile

nextOne = theList.Next

Debug.Print Chr(13) & Chr(13)
Debug.Print "######################" & Chr(13) & "the list.next first:" & theList.Next

Do While Not (theList.LastRecordRead)

counter = counter + 1

If uvSess.Error <> 0 Then
Debug.Print "error here: " & uvSess.Error
Exit Function
Else
Debug.Print "no file error"
End If

WebContentFile.RecordId = nextOne
Debug.Print "nextone = " & nextOne
WebContentFile.Read



Debug.Print "f_len = " & f_len
WebContentFile.ReadField ("1")
inner_part = inner_part & WebContentFile.Record
get_nav = "<font face='tahoma' size='2'>" & LCase(inner_part) & "</font>"
' If Not theList.LastRecordRead Then

Debug.Print "counter inner = " & counter
Debug.Print "the list.next:" & theList.Next
nextOne = CStr(theList.Next)
Debug.Print "nextone second = " & nextOne

Debug.Print "counter = " & counter
If theList.Next = "" Then
Debug.Print "NO value for next"
End If
Loop
Set theList = Nothing
Set WebContentFile = Nothing


this only displays one record. If I understand the .pdf file on page 255 section b-9, this should loop through the 'NAV' file and display the contents of the first field in the data. It does display the correct data but only for one record. I need all the contents of the file(there are more records). I can get them manipul;ating the database directly through ED or REVISE, but not through my visual basic program. I am in need of some serious help. Please help me figure this problem out.
Thank you,

Jim Crosby
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On