Questions? Feedback?powered byOlark live chat software

Standard Support

Bug 808

SQL query is not working when assigning values to a veriable in PB 2017 R2 13 June, 2018

Reynard Harrison
20 February, 2018
Product: PowerBuilder Category: IDE
Version: 2017 R2 Publishing: Public
Status: Closed Priority: P2
Classification: Issue Resolution: FIXED
Mark Lee 13 June, 2018
Hi Reynard,

Glad to hear that.
We will close this ticket!
If you have any further question, please open a new ticket!

Regards,
Mark Lee
Reynard Harrison 13 June, 2018
We have solve this issue and this Ticket can be close.
Mark Lee 28 May, 2018
Hi Reynard,

There seems no response these days. Is the issue resolved already?
If yes, we’ll proceed to close the issue; if not please let us know how we can be in assistance.

Regards,
Mark Lee
Mark Lee 24 May, 2018
Hi Reynard,
 
We tried twice to call you and it seems it was not available and was switched to text message.
If you are available today later (within 2- 3 hours in your time) please let us know and we still can do the meeting. If not I am afraid we’ll need reschedule it to next Monday 9pm in your time. (Our Tuesday)

Regards,
Mark Lee
Mark Lee 24 May, 2018
team viewer cannot connect

Hi  Reynard,

Are you available now? Found that your TeamViewer could not be connected now (see attached).
Please let me know when you are ready.

Regards,
Mark Lee
Reynard Harrison 24 May, 2018
Team Viewer Id : 391 178 467
Password : et1a72

I will be there at 9 pm est
Mark Lee 24 May, 2018
Hi Reynard,

Adding to my previous post:
Regarding the error in the provided screenshot, based on our initial analysis, it might be caused by that the Sybase.Powerbuilder.WebService.Runtime.dll (default directory: C:\Program Files (x86)\Appeon\PowerBuilder 17.0\DotNET\bin\Sybase.Powerbuilder.WebService.Runtime.dll) is missing from the development machine that is used for generating the .Net components runtime package.
So kindly please check the PB installation folder and see if the DLL file is there on the development machine.
If it is not there, please uninstall the current PB and then re-install one. Before installing PB, please make sure that .NET FRAMWORK 4.0 is installed on the machine.

Regards,
Mark Lee
Mark Lee 23 May, 2018
Hi Reynard,

So shall we reschedule another one at 9 pm, May 24 (Thursday), 2018 EST.
Please send us the TeamViewer ID and password before the meeting.
Please confirm before the meeting if this is OK for you.

Regards,
Mark Lee
Reynard Harrison 23 May, 2018
error  msg.png (26KB)

error Message.

nothing work that you suggested what is your next meeting.
Reynard Harrison 23 May, 2018
error  msg.png (26KB)

error Message.

nothing work that you suggested what is your next meeting.
Reynard Harrison 23 May, 2018
error  msg.png (26KB)

error Message.

nothing work that you suggested what is your next meeting.
Mark Lee 22 May, 2018
Hi Reynard,

Please try the following:
 
1. In directory where pbpack170.exe is stored (the default directory is C:\Program Files (x86)\Appeon\Shared\PowerBuilder), add the pbpack.ini with below contents (as attached):
[Packager]
DotNetComponents=1
 
2. Launch the Runtime Packager of PB 2017 R2 and the previous PowerBuilder .Net components will be showing up.
3. Create the PBNETER170 MSI package and install it on your developer machine and try it again (sorry I forgot to check this in the meeting yesterday).
Please let me know your test result.

Regards,
Mark Lee
Mark Lee 22 May, 2018
pbpack.ini
Reynard Harrison 22 May, 2018
Downgrading to SQL AnyWhere 16 client did remove the error message however the data is still not saving in the database.
Mark Lee 22 May, 2018
Hi Reynard,
 
Thanks for demonstrating the issue in the meeting.
It seems to be related to the DB since in the test case:
1.       We can successfully call the webservice with normal PB functions.
2.       We  can successfully execute it in the webservice when moved the database connection (scripts) in the independent PB functions.
3.       We cannot execute it when moved the database connection to PB functions with business logic and scripts for logging or to the constructor event.
4.       We did not reproduce the issue on our side.

So we’d suggest you to try it with SQL Anywhere 17 and see if it works on your side.

Of course you can downgrade your SQL Anywhere 17 client to try SQL Anywhere 16 for licensing purposes. But if there’s still the issue, please try SQL Anywhere 17 instead. You can try the free trial first or the try the developer version which is also free.
 
Look forward to the testing results.

Regards,
Mark Lee
supportteam 21 May, 2018
Hi,

Are you still there? We meant tomorrow. But if you are still there, we can do it now.

Regards,
Mark
Reynard Harrison 21 May, 2018
I am here.
Reynard Harrison 21 May, 2018
Hello Mark,

I am free tonight at 9 pm.  
Before you logon to our system can you please call me first so that I know to join the meeting. 
Reynard's Cell : 631-983-7324

Team Viewer Info 
ID : 391 178 467
Password : 44s5vi

Thank You 
Reynard
Mark Lee 20 May, 2018
Hi Reynard,
 
Quite sorry for not being able to call you on May 18.
So shall we reschedule another one at 9 pm, May 23 (Tuesday), 2018 EST.
Please send us the TeamViewer ID and password before the meeting.
Please confirm before the meeting if this is OK for you.

Regards,
Mark Lee
Reynard Harrison 18 May, 2018
when do you want to try this again.
Reynard Harrison 18 May, 2018
Mark I thought you where suppose to call me I gave you my number.

I am available all day today please call me 

reynard 
631-983-7324
Reynard Harrison 18 May, 2018
Mark I thought you where suppose to call me I gave you my number.

I am available all day today please call me 

reynard 
631-983-7324
Mark Lee 17 May, 2018
Hi Reynard,

It seems you are not available this time and we will need to reschedule. Please let us when you can be available this meeting. Please let us know the date a business day ahead so we could check and get things ready. As stated before we can be available from M-F 9:00 am to 5:00 pm (UTC +8).

Regards,
Mark Lee
Mark Lee 17 May, 2018
Yeynard,

I can't reproduce the issue in your environment. I was hoping you could be there to show me how to reproduce the issue. But it seems you are not at your computer at this moment. I will end the remote session. Please contact us again when you are ready to show us the issue. 

Thanks & Regards,

Mark Lee
Reynard Harrison 17 May, 2018
team viewer id : 391 178 467
passwd : 44s5vi
Mark Lee 16 May, 2018
Hi Reynard,

Thanks for the information.
OK, we can do it at 9 pm, May 17, 2018 EST. However I am afraid we’ll going to do the session with TeamViewer (or GoToMeeting) as we will need to view the issue on your computer first in order to debug it. So please let us know your TeamViewer ID ahead of the meeting or you may directly join the below meeting from your computer then.
https://global.gotomeeting.com/join/882721525
 
See you then.

Regards,
Mark Lee
Reynard Harrison 16 May, 2018
Reynard
Cell : 631-983-7324
Reynard Harrison 16 May, 2018
1. Please try to delete the DisableBind parameter and try again and see if it
works. Did not work
2. If you are using ODBC to connect to a database, you should add the
PBODB170.INI file to the list of resource files on the Resource Files tab page
of Web Service projects (Default directory: C:\Program Files
(x86)\Appeon\Shared\PowerBuilder\pbodb170.ini)did not work
Reynard Harrison 16 May, 2018
It’s weird and it seems to be related to database connection parameter.
1. Please try to delete the DisableBind parameter and try again and see if it
works. I will try that.
2. If you are using ODBC to connect to a database, you should add the
PBODB170.INI file to the list of resource files on the Resource Files tab page
of Web Service projects (Default directory: C:\Program Files
(x86)\Appeon\Shared\PowerBuilder\pbodb170.ini)I will try that also.
3. Have you tried the test case we provided? Yes same error What’re the results? Same error
4. So does 9:00 pm est work for you?  yes tell me what day.
Mark Lee 16 May, 2018
Hi Reynard,

It’s weird and it seems to be related to database connection parameter.
1. Please try to delete the DisableBind parameter and try again and see if it works.
2. If you are using ODBC to connect to a database, you should add the PBODB170.INI file to the list of resource files on the Resource Files tab page of Web Service projects (Default directory: C:\Program Files (x86)\Appeon\Shared\PowerBuilder\pbodb170.ini)
3. Have you tried the test case we provided? What’re the results?
4. So does 9:00 pm est work for you?  

Regards,
Mark Lee
Reynard Harrison 15 May, 2018
Okay support, 

I did some heavy testing today and found out a few things some of which I knew before when ever I commented the log_file sql statement ( INSERT INTO error_log (app,msg)  VALUES ( :app_name, :app_msg); ) things work. However, if I leave the statement in I get this error below. 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ?rtdb_subs_values@pbinterop@@$$FYM?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAURTThis@1@PAUDBI_Command@@P$AAVDBStatement@DB@PowerBuilder@Sybase@@PA_WP$01AHP$01AP$AAUIPBValue@89@HHW4DBI_PARMSTYLE@@PAUDBTransaction@1@@Z(basic_string&lt;wchar_t\,std::char_traits&lt;wchar_t>\,std::allocator&lt;wchar_t> >* , RTThis* rtthis, DBI_Command* pCommandBlock, DBStatement pStatementBlock, Char* lpszCurrentSyntax, Int32[] passedVariableOffset, IPBValue[] inputValues, Int32 iNumberOfInputItems, Int32 bSkipFirstInput, Int32 UseRealDBBindVariable, DBTransaction* transactionBlock)
   at pbinterop.rtdb_non_select_command(RTThis* rtthis, DBStatement statement, UInt32 numInputs, IPBValue[] inputValues, PBTransaction transaction)
   at c__log_file.log_file(PBString app_name, PBString app_msg)
   at c__n_appeontest.arith_metic(PBString arithmetic_sign, PBLong left_number, PBLong right_number)
   at cns_appeontest.PBWS__n_appeontest.arith_metic(String arithmetic_sign, Int32 left_number, Int32 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 92
   --- End of inner exception stack trace ---
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.HandleException(Exception ex)
   at cns_appeontest.PBWS__n_appeontest.arith_metic(String arithmetic_sign, Int32 left_number, Int32 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 102</faultstring>
         <detail/>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

If I hard code the value in the statement ( INSERT INTO error_log (app,msg)  VALUES ('AppeonTest', 'Hello World'); ) the code work and the info get save into the database however if I assign the value to a variable with the colon for example INSERT INTO error_log (app,msg)  VALUES (:app_name, :app_msg); I get the same error message above.
I think you have to remote in and shadow me to resolve this issue. I am available after 10 Am every day Monday to Friday est.
Reynard Harrison 15 May, 2018
Okay support, 

I did some heavy testing today and found out a few things some of which I knew before when ever I commented the log_file sql statement ( INSERT INTO error_log (app,msg)  VALUES ( :app_name, :app_msg); ) things work. However, if I leave the statement in I get this error below. 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ?rtdb_subs_values@pbinterop@@$$FYM?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAURTThis@1@PAUDBI_Command@@P$AAVDBStatement@DB@PowerBuilder@Sybase@@PA_WP$01AHP$01AP$AAUIPBValue@89@HHW4DBI_PARMSTYLE@@PAUDBTransaction@1@@Z(basic_string&lt;wchar_t\,std::char_traits&lt;wchar_t>\,std::allocator&lt;wchar_t> >* , RTThis* rtthis, DBI_Command* pCommandBlock, DBStatement pStatementBlock, Char* lpszCurrentSyntax, Int32[] passedVariableOffset, IPBValue[] inputValues, Int32 iNumberOfInputItems, Int32 bSkipFirstInput, Int32 UseRealDBBindVariable, DBTransaction* transactionBlock)
   at pbinterop.rtdb_non_select_command(RTThis* rtthis, DBStatement statement, UInt32 numInputs, IPBValue[] inputValues, PBTransaction transaction)
   at c__log_file.log_file(PBString app_name, PBString app_msg)
   at c__n_appeontest.arith_metic(PBString arithmetic_sign, PBLong left_number, PBLong right_number)
   at cns_appeontest.PBWS__n_appeontest.arith_metic(String arithmetic_sign, Int32 left_number, Int32 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 92
   --- End of inner exception stack trace ---
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.HandleException(Exception ex)
   at cns_appeontest.PBWS__n_appeontest.arith_metic(String arithmetic_sign, Int32 left_number, Int32 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 102</faultstring>
         <detail/>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

If I hard code the value in the statement ( INSERT INTO error_log (app,msg)  VALUES ('AppeonTest', 'Hello World'); ) the code work and the info get save into the database however if I assign the value to a variable with the colon for example INSERT INTO error_log (app,msg)  VALUES (:app_name, :app_msg); I get the same error message above.
I think you have to remote in and shadow me to resolve this issue. I am available after 10 Am every day Monday to Friday est.
Reynard Harrison 15 May, 2018
Okay support, 

I did some heavy testing today and found out a few things some of which I knew before when ever I commented the log_file sql statement ( INSERT INTO error_log (app,msg)  VALUES ( :app_name, :app_msg); ) things work. However, if I leave the statement in I get this error below. 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ?rtdb_subs_values@pbinterop@@$$FYM?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAURTThis@1@PAUDBI_Command@@P$AAVDBStatement@DB@PowerBuilder@Sybase@@PA_WP$01AHP$01AP$AAUIPBValue@89@HHW4DBI_PARMSTYLE@@PAUDBTransaction@1@@Z(basic_string&lt;wchar_t\,std::char_traits&lt;wchar_t>\,std::allocator&lt;wchar_t> >* , RTThis* rtthis, DBI_Command* pCommandBlock, DBStatement pStatementBlock, Char* lpszCurrentSyntax, Int32[] passedVariableOffset, IPBValue[] inputValues, Int32 iNumberOfInputItems, Int32 bSkipFirstInput, Int32 UseRealDBBindVariable, DBTransaction* transactionBlock)
   at pbinterop.rtdb_non_select_command(RTThis* rtthis, DBStatement statement, UInt32 numInputs, IPBValue[] inputValues, PBTransaction transaction)
   at c__log_file.log_file(PBString app_name, PBString app_msg)
   at c__n_appeontest.arith_metic(PBString arithmetic_sign, PBLong left_number, PBLong right_number)
   at cns_appeontest.PBWS__n_appeontest.arith_metic(String arithmetic_sign, Int32 left_number, Int32 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 92
   --- End of inner exception stack trace ---
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.HandleException(Exception ex)
   at cns_appeontest.PBWS__n_appeontest.arith_metic(String arithmetic_sign, Int32 left_number, Int32 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 102</faultstring>
         <detail/>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

If I hard code the value in the statement ( INSERT INTO error_log (app,msg)  VALUES ('AppeonTest', 'Hello World'); ) the code work and the info get save into the database however if I assign the value to a variable with the colon for example INSERT INTO error_log (app,msg)  VALUES (:app_name, :app_msg); I get the same error message above.
I think you have to remote in and shadow me to resolve this issue. I am available after 10 Am every day Monday to Friday est.
Mark Lee 14 May, 2018
Hi Reynard,
 
Please refer to the attached test case that can be deployed on our side. 
Please try it on your side and see if you can deploy it.

If you cannot deploy it, let's schedule a remote session to debug it. We would recommend to make the remote session during our working time which is 9:00 ~ 17:00 M-F (we are in UTC +8) thus we can get immediate help from other teams if necessary. (teamviewer or gotomeeting)

Regards,
Mark Lee
Mark Lee 14 May, 2018
new  testcase 808
Reynard Harrison 14 May, 2018
I think this gone on long enough I need someone to shadow me and see what are the issues are and tell me if they can be resolve. 

Hi Reynard,

We can deploy your provided Webservice app correctly on our side.
So was this log generated from the deployment of your provided Webservice app?
If yes,
1.       Please make sure the .net Framework v4.0 is installed on the machine for deployment.
Yes this is install
2.       The IIS service is installed.
Yes cant do webservice without it
3.       Is it reproducible on a different machine?
same error from a different machine I dont want to try on a different PC due to fact all the issues are on this pc
 
If not (but was generated from receiving the webservice), kindly please provide a test case to us for further analysis.

I already gave you a copy of this app.
 
Regards,
Reynard
Reynard Harrison 14 May, 2018
I think this gone on long enough I need someone to shadow me and see what are the issues are and tell me if they can be resolve. 

Hi Reynard,

We can deploy your provided Webservice app correctly on our side.
So was this log generated from the deployment of your provided Webservice app?
If yes,
1.       Please make sure the .net Framework v4.0 is installed on the machine for deployment.
Yes this is install
2.       The IIS service is installed.
Yes cant do webservice without it
3.       Is it reproducible on a different machine?
same error from a different machine I dont want to try on a different PC due to fact all the issues are on this pc
 
If not (but was generated from receiving the webservice), kindly please provide a test case to us for further analysis.

I already gave you a copy of this app.
 
Regards,
Reynard
Reynard Harrison 14 May, 2018
I think this gone on long enough I need someone to shadow me and see what are the issues are and tell me if they can be resolve. 

Hi Reynard,

We can deploy your provided Webservice app correctly on our side.
So was this log generated from the deployment of your provided Webservice app?
If yes,
1.       Please make sure the .net Framework v4.0 is installed on the machine for deployment.
Yes this is install
2.       The IIS service is installed.
Yes cant do webservice without it
3.       Is it reproducible on a different machine?
same error from a different machine I dont want to try on a different PC due to fact all the issues are on this pc
 
If not (but was generated from receiving the webservice), kindly please provide a test case to us for further analysis.

I already gave you a copy of this app.
 
Regards,
Mark Lee
Mark Lee 13 May, 2018
Hi Reynard,

We can deploy your provided Webservice app correctly on our side.
So was this log generated from the deployment of your provided Webservice app?
If yes,
1.       Please make sure the .net Framework v4.0 is installed on the machine for deployment.
2.       The IIS service is installed.
3.       Is it reproducible on a different machine?
 
If not (but was generated from receiving the webservice), kindly please provide a test case to us for further analysis.
 
Regards,
Mark Lee
Reynard Harrison 11 May, 2018
what am I doing wrong
Reynard Harrison 11 May, 2018
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ?rtdb_subs_values@pbinterop@@$$FYM?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAURTThis@1@PAUDBI_Command@@P$AAVDBStatement@DB@PowerBuilder@Sybase@@PA_WP$01AHP$01AP$AAUIPBValue@89@HHW4DBI_PARMSTYLE@@PAUDBTransaction@1@@Z(basic_string&lt;wchar_t\,std::char_traits&lt;wchar_t>\,std::allocator&lt;wchar_t> >* , RTThis* rtthis, DBI_Command* pCommandBlock, DBStatement pStatementBlock, Char* lpszCurrentSyntax, Int32[] passedVariableOffset, IPBValue[] inputValues, Int32 iNumberOfInputItems, Int32 bSkipFirstInput, Int32 UseRealDBBindVariable, DBTransaction* transactionBlock)
   at pbinterop.rtdb_non_select_command(RTThis* rtthis, DBStatement statement, UInt32 numInputs, IPBValue[] inputValues, PBTransaction transaction)
   at c__log_file.log_file(PBString app, PBString logstr)
   at c__n_appeontest.constructor()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at Sybase.PowerBuilder.EventRequest.Invoke(PBSessionBase session)
   at Sybase.PowerBuilder.PBEventTrigger.TriggerEvent(PBPowerObject po, PBString e)
   at Sybase.PowerBuilder.PBSessionBase.TriggerEvent(PBPowerObject po, PBString e)
   at Sybase.PowerBuilder.PBPowerObject.TriggerEvent(PBString e)
   at c__n_appeontest.create()
   at Sybase.PowerBuilder.PBPowerObject.OnCreate(Boolean init)
   at Sybase.PowerBuilder.PBSessionBase.CreateInstance(PBPowerObject parent, Type type, Boolean init, Boolean is4ApplicationInit, Object[] parm)
   at Sybase.PowerBuilder.PBSessionBase.CreateInstance(PBPowerObject parent, Type type, Object[] parm)
   at Sybase.PowerBuilder.PBPowerObject.CreateInstance(Type type, Object[] parm)
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.CreateObject(Type t)
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.Prepare()
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.Initialize()
   at cns_appeontest.PBWS__n_appeontest.arithmetic_operations_sign(String arithmetic_sign, Nullable`1 left_number, Nullable`1 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 43
   --- End of inner exception stack trace ---
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.HandleException(Exception ex)
   at cns_appeontest.PBWS__n_appeontest.arithmetic_operations_sign(String arithmetic_sign, Nullable`1 left_number, Nullable`1 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 63</faultstring>
         <detail/>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>
Reynard Harrison 11 May, 2018
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Client</faultcode>
         <faultstring>System.Web.Services.Protocols.SoapException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ?rtdb_subs_values@pbinterop@@$$FYM?AV?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAURTThis@1@PAUDBI_Command@@P$AAVDBStatement@DB@PowerBuilder@Sybase@@PA_WP$01AHP$01AP$AAUIPBValue@89@HHW4DBI_PARMSTYLE@@PAUDBTransaction@1@@Z(basic_string&lt;wchar_t\,std::char_traits&lt;wchar_t>\,std::allocator&lt;wchar_t> >* , RTThis* rtthis, DBI_Command* pCommandBlock, DBStatement pStatementBlock, Char* lpszCurrentSyntax, Int32[] passedVariableOffset, IPBValue[] inputValues, Int32 iNumberOfInputItems, Int32 bSkipFirstInput, Int32 UseRealDBBindVariable, DBTransaction* transactionBlock)
   at pbinterop.rtdb_non_select_command(RTThis* rtthis, DBStatement statement, UInt32 numInputs, IPBValue[] inputValues, PBTransaction transaction)
   at c__log_file.log_file(PBString app, PBString logstr)
   at c__n_appeontest.constructor()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at Sybase.PowerBuilder.EventRequest.Invoke(PBSessionBase session)
   at Sybase.PowerBuilder.PBEventTrigger.TriggerEvent(PBPowerObject po, PBString e)
   at Sybase.PowerBuilder.PBSessionBase.TriggerEvent(PBPowerObject po, PBString e)
   at Sybase.PowerBuilder.PBPowerObject.TriggerEvent(PBString e)
   at c__n_appeontest.create()
   at Sybase.PowerBuilder.PBPowerObject.OnCreate(Boolean init)
   at Sybase.PowerBuilder.PBSessionBase.CreateInstance(PBPowerObject parent, Type type, Boolean init, Boolean is4ApplicationInit, Object[] parm)
   at Sybase.PowerBuilder.PBSessionBase.CreateInstance(PBPowerObject parent, Type type, Object[] parm)
   at Sybase.PowerBuilder.PBPowerObject.CreateInstance(Type type, Object[] parm)
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.CreateObject(Type t)
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.Prepare()
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.Initialize()
   at cns_appeontest.PBWS__n_appeontest.arithmetic_operations_sign(String arithmetic_sign, Nullable`1 left_number, Nullable`1 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 43
   --- End of inner exception stack trace ---
   at Sybase.PowerBuilder.Web.WebServices.PBWebService.HandleException(Exception ex)
   at cns_appeontest.PBWS__n_appeontest.arithmetic_operations_sign(String arithmetic_sign, Nullable`1 left_number, Nullable`1 right_number) in c:\Project\PB\test_Appeon\pb2cstempout\appeontest\appeontest.asmx.cs:line 63</faultstring>
         <detail/>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>
Mark Lee 09 May, 2018
Hi Reynard,

We created a new PB sample case based on the webserivce you provided to call the webserivce.
We verified that it can correctly read and write data in the database and write associated log.
We can’t duplicate the issue you have.
 
Therefore, we suggest that you do a full build of your webservice and PB code.
Manually remove your previously deployed webserice files (appeontest_root and appeontest folders under C:\inetpub\wwwroot).
And then re-deploy your webservice to verify if the issue disappears.
 
BTW, please remove the code “return 0” in the contractor event of the n_appeontest object in your webservice.
This line of code will cause all SQL execution to fail.

Regards,
Mark Lee
Mark Lee 25 April, 2018
Hi Reynard,

Thanks for quick update!
We will work on to reproduce the issue.
We will keep you posted of the results here.

Regards,
Mark Lee
Reynard Harrison 24 April, 2018
CREATE TABLE "DBA"."users" (
    "userid"                         integer NOT NULL DEFAULT autoincrement
   ,"username"                       varchar(50) NOT NULL
   ,"password"                       varchar(32) NULL
   ,"grp"                            varchar(8) NOT NULL
   ,"fullname"                       varchar(50) NOT NULL
   ,"status_code"                    char(1) NOT NULL DEFAULT 'A'
   ,"allowed_hold_reason"            char(1) NOT NULL DEFAULT 'N'
   ,"oe_running"                     char(1) NOT NULL DEFAULT 'N'
   ,"quote_running"                  char(1) NOT NULL DEFAULT 'N'
   ,"last_access"                    "datetime" NULL
   ,CONSTRAINT "PK_users" PRIMARY KEY CLUSTERED ("userid" ASC) 
)

---------------------------------------------------------------------------------------

CREATE TABLE "DBA"."error_log" (
    "ts"                             timestamp NOT NULL DEFAULT current timestamp
   ,"msg"                            varchar(4096) NOT NULL
   ,"idx"                            bigint NOT NULL DEFAULT autoincrement
   ,"app"                            varchar(256) NULL
   ,PRIMARY KEY ("idx" ASC) 
)
Mark Lee 24 April, 2018
Hi Reynard,
 
We can deploy and run your WS.
We’ll work on to verify the problem and please generate the users table and error_log table in your test cast into table structure via SQL and send them to us for further study.

Regards,
Mark Lee
Reynard Harrison 23 April, 2018
however if I dont assign the value to variable and put the value directly in the function it save into the database.
Reynard Harrison 23 April, 2018
test_Appeon.zip (10KB)

issue log_file not saving to database. Please see the new test file attached.
Mark Lee 19 April, 2018
Hi Reynard,
 
OK, so is it possible to provide us a workable PB sample so we can pick up the test of this issue?
 
Regards,
Mark Lee
Reynard Harrison 19 April, 2018
Hello support 

Maybe this was the wrong project to send you these dll are deeply rooted in our system and can only work in our system.
Reynard Harrison 19 April, 2018
Hello support 

Maybe this was the wrong project to send you these dll are deeply rooted in our system and can only work in our system.
Mark Lee 18 April, 2018
the other DLLs
Mark Lee 18 April, 2018
Hi Reynard,

By including the .Net Web and .Net Assembly, we meant the PB code for these related functions. Sorry for not being clear in the previous post.
 
Thanks for the test case.
1.       Please also provide the detailed steps to reproduce this issue.
2.       Please provide the other DLLs shown in the attachment to us for deploy the webservice.
3.       If any third party calling is required to reproduce this bug, please also include the related the test cases as well.
Thanks in advance.

If the your test is less than 20 MB, you can zip it and upload it here in this ticket as attachment directly.
If you it is larger than 20 MB, please upload the file to our FTP site and let me know the file name. Thanks.
FTP site: ftp.appeon.com
Username: guest
Password: guest


Regards,
Mark Lee
Reynard Harrison 17 April, 2018
MakeAnOrder.zip (1256KB)

.Net Web <-- Can you tell me where this is located.
.Net Assembly, <-- Can you tell me where this is located.
Mark Lee 17 April, 2018
Hi Reynard,
 
Greetings. Kindly please provide us a complete PB sample including .Net Web and .Net Assembly, etc. that can reproduce this issue so we can continue the investigation for this issue.
 
Regards,
Mark Lee
Govinda Lopez 19 March, 2018
Hi Reynard,

We will continue doing some more testing. We will do the best to try to reproduce it. We will let you know about the results here.


Regards,
Govinda Lopez 14 March, 2018
Hi Reynard,

The issue you reported is not a consistently reproducible issue for all customers.  So, for such issue, we will require that you provide a test case in order for us to be able to help you.  If for some reason you cannot provide a test case we will need to close this ticket.

Thank you for your cooperation.
Govinda Lopez 05 March, 2018
Hi Reynard,

Our team is working on reproducing the case. So far we haven't been able to. It is necessary to reproduce it in our environments in order to proceed with a root cause analysis.

Can you provide us with a reproducible test case? This will help speed things up.


Regards,
Reynard Harrison 21 February, 2018
Reynard
631-254-5220
Reynard Harrison 21 February, 2018
I have been battling this issue for almost a month
Reynard Harrison 21 February, 2018
Chris it would be great if you can help me fix this issue on my pc due to fact you know exactly what is the cause. Please use Team viewer to give me an hand.
Chris Pollach 21 February, 2018
Hi Guys;

  FYI: This is typically not a bug. Its the way the IDE works with any DBMSa dn in-line SQL. All in-line SQL is verified by sending it to the current active DB Profile connection DBMS with a "NO EXECUTE" request added to it. The NO EXEC basically instructs the DBMS to only parse the DML statement and then return any error code and error message from the parsing operation to the PB IDE for display to the developer.
   So if you are not connecting to the correct DB Profile, DBMS, wrong database or even the wrong instance of a DB that does not reflect the current schema definition - you will get these errors. This is that way PB has operated since v2.0.
   To suppress these messages if you are compiling against a non-current schema, just set the "Disable DB Connection When Compiling" in the IDE's System Options dialogue's General tab.

FWIW: I cannot reproduce this error when compiling any Apps with in-line SQL against ASE 16, SS 2017 or SA 16/17 using my R2 installation.

Regards ... Chris
Govinda Lopez 21 February, 2018
Hi all,

Aftering remoting into the customer's computer, we know he has created a .Net Web and .Net Assembly. The problem is that the WS is not commiting to the database (Sybase SQL Anywhere 16). The customer is using PowerBuilder 2017 R2 on a Windows 10 64 bit computer. He is using ODBC.


Regards,
Govinda Lopez 21 February, 2018
Hi Reynard,

I will transfer your ticket to our engineering team for further analysis. We will keep you posted of the results here.


Regards,
Reynard Harrison 20 February, 2018
We can do the remote session using TeamViewer. TeamViewer work
Reynard Harrison 20 February, 2018
We can do the remote session using TeamViewer. TeamViewer work
Reynard Harrison 20 February, 2018
11 AM perfect
Govinda Lopez 20 February, 2018
Hi Reynard,

Is it good for you at 11 AM (EST)? We can do the remote session using TeamViewer.


Regards,
Reynard Harrison 20 February, 2018
can schedule a time in the morning 
here is my work number 631-254-5220
name : reynard
Govinda Lopez 20 February, 2018
Hi Reynard,

Sorry for the delay. I have been attending other customers.

Can we setup the meeting to begin in another 2 hours?


Regards,
Reynard Harrison 20 February, 2018
are we starting the meeting today ?
Reynard Harrison 20 February, 2018
I am ready now I am in the EST Timezone 
I am in NYC
Govinda Lopez 20 February, 2018
Hi Reynard,

We can setup a remote session to further help you. Please let us know the best date and time for this. Our normal America working ours are from 9 AM to 5 PM US Eastern Time. But we can arrange for the team to assist you on a different timezone.

You can download our remote session client from: https://get.teamviewer.com/appeon-support


Regards,
Reynard Harrison 20 February, 2018
DB Error.jpg (61KB)

getting an error running your code lets set up a remote meeting.
Govinda Lopez 20 February, 2018
Reproducible Test Case 1
Govinda Lopez 20 February, 2018
Hi Reynard,

I was not able to reproduce your case. I have attached a test case. Please test it in your configuration and do let us know if this worked. If so, please do provide us with a test case so we can reproduce and further analyze it.

The database I used in this example is: (PB Demo DB V2017) by Sybase.

Regards,
Govinda Lopez 20 February, 2018
Hi Reynard,

I'm working on reproducing your case. But I would like to ask you the following:

1.- The INSERT INTO error_log (app, msg) VALUES(:a1, :a2); is what is not getting done, right?
2.- Do you get an error message in the SQLCA.SQLCODE and/or on the SQLCA.SQLERRTEXT?


Regards,
Reynard Harrison 20 February, 2018
This only happens when doing a soap routine soap server.
Reynard Harrison 20 February, 2018
*Phenomenon:

When assigning a value to a variable in an SQL query the query does not work. However if I hard the value in the query the SQL query work. 

string a1, a2

SQLCA.database = "GMGT_Order_Entry"
SQLCA.DBMS       = "ODBC"
SQLCA.AutoCommit = TRUE
SQLCA.DbParm     = "ConnectString='DSN=" + SQLCA.database + ";DisableBind=1;UID=dba;PWD=sql',TrimSpaces='Yes'"

CONNECT using sqlca;
if( sqlca.SQLCode <> 0 ) then
	trackproresp.issuccess = false
	trackproresp.resultcode = sqlca.sqlcode
	trackproresp.status = "NG"
	trackproresp.statusdesc =  SQLCA.SQLErrText
//	db_connected = False
else
	trackproresp.issuccess = true
	trackproresp.resultcode = sqlca.sqlcode
	trackproresp.status = "GOOD"
	trackproresp.statusdesc =  "DB Connected"
//	db_connected = True
	a1 = "GMG_Tracking"
	a2 = "DB Connected"
	INSERT INTO error_log (app, msg) VALUES(:a1, :a2);
end if


*Reproduce Steps:
Yes, we can.

Remark:

the variable was a string and the database is varchar.
OS:
Windows 7 
Platform:
64-bit 
Database Type:
SAP ASA 
Database Version:
SQL ANYWHERE 17.0.4.2053