I created a sql server stored procedure, works fine in both the SQL Query tools and in a datawindow i created which uses Stored Procedure as the definition source
In the PB IDE Painter I can retrieve the datawindow results, it executes SP just fine using PREVIEW when in the IDE, seems legit.
When I execute the runtime build of the app the datastore I have created with the datawindow keeps returning -1
When I debug the runtime the arguments are all correct, and yet its not pulling any data.
Connection details:
DBMS = SNC SQL Native Client(OLE DB)
DBParm = appname='APPNAME',Identity='SCOPE_IDENTITY()',database='DB_NAME',CommitOnDisconnect='No',StaticBind='0',ncharbind='1',DisableBind='0',OJSyntax='ANSI',PBTrimCharColumns='YES',DelimitIdentifier='No'
Long LL_RC
datastore LDS_Data
LDS_Data = create datastore
LDS_Data.DataObject = 'd_sp_1x3p'
LDS_Data.SetTransObject(GUO_SQLSRV)
LL_RC = LDS_Data.Retrieve(AL_ID, AS_Type, AL_Acct_ID)
But LL_RC always returns -1, There should be 450+ rows ...
I can connect and do every other crud imaginable, but for some reason SP wont retrieve,
I do not see any SQLErrText strings or error codes being thrown.
Any thoughts on what else I should be looking at?
F.
Indeed the dba had a column that returns 1 or 0 set as char(1) and I was trying to define it as a number because which of us is smarter?
The only question i really have now is that I have this uo_ds datastore for debugging the problem should i go back to the standard datastore or leave the uo_ds in there?
thanks for all the help folks
I would have code in the dberror event that saves all the arguments into instance variables. Then they are all available to the script that has the retrieve function call. If the return code is -1, then display the error information from the instance variables.