1. Cynthia Nixon
  2. PowerBuilder
  3. Wednesday, 3 July 2019 15:43 PM UTC

Our original product used PowerBuilder 9.0.3.  We are now required to use SQL Server Native Client 11.0.


For now, we are testing with the PowerBuilder 2019 (trial version) for our application; while we wait on the final purchase of PowerBuilder 2019. We are having the issue described in this link. 

https://community.appeon.com/index.php/qna/q-a/sql-bit-columns-returning-1-instead-of-1-to-the-datawindow

We have made the StaticBind=0 change.  Should we need to make more changes than just setting the StaticBind=0?


We see other datawindow errors, but not sure if we are now required to make additional datawindow changes.

David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Wednesday, 3 July 2019 16:34 PM UTC
  2. PowerBuilder
  3. # 1

Hi

I'm sure I have seen this before, but cannot find the related thread. I've tried searching for it but cannot find anything yet. Just thought I would post here in-case anyone else remembers what the issue was.

Sorry I was not able to put my finder on it for you.

David

Comment
  1. Cynthia Nixon
  2. Thursday, 11 July 2019 20:59 PM UTC
I am now running with DBParm=DBTextLimit='65000',Provider='SQLNCLI11',Database='tmChannel',StaticBind=0



I run further in the application, but when processing the following statement, a (-1) is still being returned.

iRows = i_dsFaciName.Retrieve(p_sFaciType, p_iFaciCode))



I checked the SELECT statement for this datastore, and SELECT statement is correct. (I can query it in MS SQL server).



Any more ideas for me? Thanks so much.
  1. Helpful
  1. David Peace (Powersoft)
  2. Friday, 12 July 2019 09:11 AM UTC
Does that DW retieve work in the IDE?
  1. Helpful
  1. Berka Frenfert
  2. Thursday, 27 August 2020 12:20 PM UTC
Sorry, I came very late to respond but i was searching because forgot what i did long time ago to solve this issue.



I think you have to keep playing with StaticBind=1 and StaticBind=0 because my little experience tell me no other way except to do the following



The datawindow that fail to retrieve. Before the retrive function call, set a local string variable with sqlca.dbparm value and then change the DBparm as following

SQLCA.Dbparm += ",StaticBind=1"

let the retrieve function run and right after retrieve() set the orignal DBparm value back to SQLCA.



Most probably StaticBind attribute will be set twice in DBparm but that does not matter because last occurance is considered. Anyway, you are setting back the original stored in local variable.

That dirty trick works for me !!! :)



  1. Helpful
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Wednesday, 3 July 2019 16:41 PM UTC
  2. PowerBuilder
  3. # 2

Try using the SNC database interface instead of OLE. I have seen spurious errors with OLE & SQL Server that went away when switching to SNC.

Comment
There are no comments made yet.
Cynthia Nixon Accepted Answer Pending Moderation
  1. Wednesday, 3 July 2019 17:29 PM UTC
  2. PowerBuilder
  3. # 3

Roland,

Can you explain what you mean by saying, " Try using the SNC database interface instead of OLE"?

Thanks,

 

For our database connection, here is how we use the OLEobject:

OLEObject oleDBInfo
oleDBInfo = CREATE oleobject

iRet = oleDBInfo.connecttonewobject ("BaseDBLibCom.DatabaseInfo")

 

The BaseDBLibCom.DatabaseInfo info contains:

 

For our database connection, we read the following from an ini file:

DBParm=DBTextLimit='65000',Provider='SQLNCLI11',Database='tmChannel',StaticBind=0

Comment
  1. Cynthia Nixon
  2. Wednesday, 3 July 2019 18:03 PM UTC
I failed to add the following:



The BaseDBLibCom.DatabaseInfo info contains:







I'm actually able to connect with the database. But, the datawindow function .Retrieve gave the (-1).
  1. Helpful
  1. Cynthia Nixon
  2. Wednesday, 3 July 2019 18:06 PM UTC
I see my problem. This info will not display. I'll write it in this string from this time:

"The BaseDBLibCom.DatabaseInfo info contains: "
  1. Helpful
  1. Cynthia Nixon
  2. Wednesday, 3 July 2019 18:06 PM UTC
One more try: database type="ChannelServer" databaseName="tmchannel" dataSource="ChannelServerDataSource" dbms="SNC" secure="no" autoCreateODBC="yes"
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.