It's been a while since I did a lot of serious PB coding and I'm back to making newbie mistakes. This is classic PB 12.5 with the client running on Windows Vista against an Oracle database.
When I try to retrieve my datastore the return value is -1.
ltr_trans = Create transaction
ltr_trans.DBMS = SQLCA.DBMS
ltr_trans.LogPass = SQLCA.LogPass
ltr_trans.ServerName = SQLCA.ServerName
ltr_trans.LogId = SQLCA.LogId
ltr_trans.AutoCommit = SQLCA.AutoCommit
ltr_trans.DBParm = SQLCA.DBParm
Connect Using ltr_trans;
If ltr_trans.SQLCode = -1 THEN
MessageBox("Database Connect Error", ltr_trans.SQLErrText)
Return
End If
// Set up the PLAYER_HISTORY table
lds_last_change = CREATE datastore
lds_last_change.dataobject = 'dw_player_history_by_player'
If (lds_last_change.SetTransObject(ltr_trans) = -1) Then
MessageBox('SetTransObject Failure', lds_last_change.dataobject + ' Failed')
Return
End If
...
....
....
// Retrieve the player into the datastore
li_PlayerCount = lds_last_change.Retrieve(ls_PlayerAbbr)
// Check for a retrieve error
If li_PlayerCount = -1 Then
MessageBox('Datawindow Retrieve Failure', 'Error: ' + ltr_trans.SQLErrText )
Exit
End If
1. The SQLCA connection is working. There are DataWindows in the the same Window that are retrieving data OK. So the connection information is good.
2. There are no errors in the ltr_trans object.
3. There is no error when calling SetTransObject().
4. The Dataflow retrieves fine in the design mode. It retrieves a single row using the same argument the script is using.
5. I've gone through the debugger and everything looks like I expect it to.
It has to be something simple that I'm not remembering.
Jim Egan
Senior Consultant
ProKarma, Inc.