Hallo!
Ich hab ein Problem mit dem db2 Connector.
Die Connection selber geht gut, allerdings bekomme ich keine Daten.
Wenn ich das gleiche Select in der Commandline einfüge, get es schon - am Select liegt es also nicht.
Komisch ist, das ich beim Execute -1 zurück bekomme - ich hab allerdings nirgends eine Beschreibung gefunden was das aussagt.
Hab ich da irgendwas falsch gemacht?
Hier mal der Code. Den hab ich mir aus der Hilfe zusammengestoppelt. Ich hab sowas vorher noch nie gemacht

| |
| ' Uselsx "*lsxlc" --> in den Options |
| |
| Dim mydb As LCConnection |
| Dim count as Integer |
| Dim myReturn As LCFieldList |
| Dim auftrag As LCField |
| Dim project As LCField |
| Dim user As LCField |
| Dim numOfMod As LCField |
| Dim numOfModGT551 As LCField |
| Dim numOfModST551 As LCField |
| |
| |
| Set mydb = New LCConnection ("db2") |
| |
| mydb.Database = GetDb(configDoc) |
| mydb.Userid = GetUser(configDoc) |
| mydb.Password = GetPassword(configDoc) |
| |
| ' Connect geht gut |
| mydb.Connect |
| |
| |
| ' liefert -1 |
| count = mydb.Execute("select auftrag, project, user, sum1, sum2, sum3 from auftrag", myReturn) |
| |
| if(count > 0) then |
| While (mydb.Fetch (myReturn) > 0) |
| |
| Set auftrag = myReturn.GetField(1) |
| Set project = myReturn.GetField(2) |
| Set user = myReturn.GetField(3) |
| Set numOfMod = myReturn.GetField(4) |
| Set numOfModGT551 = myReturn.GetField(5) |
| Set numOfModST551 = myReturn.GetField(6) |
| |
| Print(project.Text(0)) |
| Print(user.Text(0)) |
| Print(numOfMod.Text(0)) |
| Print(numOfModGT551.Text(0)) |
| Print(numOfModST551.Text(0)) |
| |
| Wend |
| end if |
Kann mir bitte jemand helfen?
edit: Ach ja keine Ahnung ob das wichtig ist, aber die DB liegt am Host
Danke
lg
Alex