1. Miguel Leeuwe
  2. SnapDevelop
  3. Friday, 19 February 2021 15:52 PM UTC

Hi,

I've downloaded everything to run the EChart example (https://github.com/Appeon/PowerBuilder-RestClient-Example) and watched the presentation done by Govinda, but ....

There seems to be no information of which driver I should use for the sqlserver Adventureworks db. MS OLEDB, ODBC, SNC? 32 and 64 bit? etc.

I've tried SNC and from SnapDevelop I'm getting 200 OK status, but when running the corresponding powerbuilder application I'm getting connection Errors.

Any guidance on this would be much appreciated.

TIA

 

Accepted Answer
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 20 February 2021 14:03 PM UTC
  2. SnapDevelop
  3. # Permalink

Sorry Armando to clear your answer as THE answer, but the real problem I had was with Snapdevelop not being able to connect.

After spending waaay too many hours on this, I vaguely remembered having read something about "named pipes". Since I didn't use SQLserver at that moment, I didn't really read it. Now I did, and I'm happy again:

Here's the solution: reported by Matt and solved by Govinda:
https://community.appeon.com/index.php/qna/q-a/snapdevelop-sql-server-db-connection/oldest#filter-sort

Basically, you have to enable "named pipes" and "tcp-ip":
https://www.blackbaud.com/files/support/infinityinstaller/content/installermaster/tkenablenamedpipesandtcpipconnections.htm

I'm not sure why for a simple connection from powerbuilder all of this doesn't seem to be necessary. With powerbuilder, the only thing missing for me was that I needed to have the "SQL Server Browser" service running.

regards.

Comment
  1. Armeen Mazda @Appeon
  2. Saturday, 20 February 2021 14:48 PM UTC
Thanks for posting the correct solution!
  1. Helpful
  1. armando herrera @Appeon
  2. Monday, 22 February 2021 19:47 PM UTC
Miguel,



Thank you!

I appreciate very much you took the time to clarify it. ;)

Regards!
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 22 February 2021 20:48 PM UTC
yw, by the way, the Echarts are awesome!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 20 February 2021 00:31 AM UTC
  2. SnapDevelop
  3. # 1

Okay.

I give up (and for me that is usually very hard to say)!

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 20 February 2021 00:12 AM UTC
  2. SnapDevelop
  3. # 2

I did verify and it should all be ok.

but when running the salesdemo app:

---------------------------
Error
---------------------------
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
---------------------------
OK   
---------------------------

 

e\POWERBUILDER2019\PB-RestClient-Example\NET-DataStore\.NET-DataStore\Appeon.DataStoreDemo.SqlServer\Services\Impl\ServiceBase.cs:line 18
   at Appeon.DataStoreDemo.SqlServer.Controllers.ProductController.WinOpen() in D:\_WizSource\POWERBUILDER2019\PB-RestClient-Example\NET-DataStore\.NET-DataStore\Appeon.DataStoreDemo.SqlServer\Controllers\ProductController.cs:line 37
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
ClientConnectionId:00000000-0000-0000-0000-000000000000
Error Number:2,State:0,Class:20

 

Comment
There are no comments made yet.
armando herrera @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 February 2021 22:12 PM UTC
  2. SnapDevelop
  3. # 3

Hi Miguel, 

If you are interested in eCharts, here you can find another PBApp! 

Example Graph App -- This demo app is newly added in 2019 R3. It uses the PowerBuilder WebBrowser control to render the third-party visual charts (such as Google ChartsApache EChart etc.) which are exposed as JavaScript classes. These JavaScript/HTML5 charts can be served as a useful supplement to the PowerBuilder Graph DataWindow control.

All Apps 
Best match 
Documents 
Web 
More 
Example Graph App 
App 
Search the web 
example graph - see web results 
example graphql 
example graph data 
example graph paper 
example graphql api 
example graph dataset 
example graphql query 
example graph function 
Folders 
Example Graph App 
example graph App 
145 
Example Graph App 
App 
Open 
Run as administrator 
Open file location 
Pin to Start 
Pin to taskbar 
Uninstall

This one connects to a SQL Anywhere database that comes in 2019R3 New build version 2670 Installation Package!. 

Regards!

 
Comment
  1. Miguel Leeuwe
  2. Friday, 19 February 2021 23:49 PM UTC
Ha!, Well at least now I can have a look at the charts and show it to people here (trying to get rid of my own MS Charts ActiveX, one install less).

Thank you so much!

(but now .. I still want to figure out what I'm doing wrong when trying to run the rest demo).

:)
  1. Helpful
There are no comments made yet.
armando herrera @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 February 2021 20:57 PM UTC
  2. SnapDevelop
  3. # 4

This is the correct DB 

AdventureWorks2012 * 

Comment
There are no comments made yet.
armando herrera @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 February 2021 20:49 PM UTC
  2. SnapDevelop
  3. # 5

Hi Miguel

I'm sharing with you my setup. 

I have created an SNC profile on my localhost connected to SQL-Server 64 - 2017.

Is your server on the localhost?

Check you are choosing the right provider according to your SQL-Server version.

 

 

Please let me know if this helps! 

Regards!

 

 

 

Comment
  1. Miguel Leeuwe
  2. Saturday, 20 February 2021 00:18 AM UTC
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)

Sep 24 2019 13:48:23

Copyright (C) 2019 Microsoft Corporation

Express Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 19042: )

  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 20 February 2021 00:19 AM UTC
hmmm, now that I look at it: you have SQL Server 2017, me I have 2019.
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 20 February 2021 14:07 PM UTC
By the way Armando, we are not recommended to use that native database driver anymore. That one and another one have been deprecated by Microsoft and now we should use the MSOLEDBSQL SQL SERVER driver.

See Govinda's video: https://www.youtube.com/embed/ToJZVj6Lhg0

Thank for all your help!.
  1. Helpful
There are no comments made yet.
armando herrera @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 February 2021 18:58 PM UTC
  2. SnapDevelop
  3. # 6

Hi Miguel 

Please try to connect to your DB natively using SNC and then modify the ConnectionString to your actual DB to see if that works.

 

Regards!

 

Comment
  1. Miguel Leeuwe
  2. Friday, 19 February 2021 19:05 PM UTC
Where do I get this dialog window that you show me?

regards
  1. Helpful
  1. armando herrera @Appeon
  2. Friday, 19 February 2021 21:51 PM UTC
Go to View -> DB Server Explorer

Connect to DB
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 20 February 2021 00:30 AM UTC
Okay, thank you. I've tried this now and this is what seems to fail!

See pasted picture in another answer. I think I'm giving up Armando, don't want to waste you time anymore. Life is too short. At least I can demo the Echarts, which was my main goal.

Thank you for all your support!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 19 February 2021 18:56 PM UTC
  2. SnapDevelop
  3. # 7

this is what I get when running the snapdevelop solution:

this is what I get when trying to run the appeon salesdemo:

the database is installed on my same PC and remote access is enabled.

regards.

Comment
There are no comments made yet.
armando herrera @Appeon Accepted Answer Pending Moderation
  1. Friday, 19 February 2021 18:12 PM UTC
  2. SnapDevelop
  3. # 8

Hi Miguel,

Please check the connection string.

"Catalog=AdventureWorks2012;Integrated Security=False;User ID=sa;Password=Appeon123456"

(Please notice that the backup provided creates a AdventureWorks2012 Database and the connection string only says  AdventureWorks).

Regards! 

 

 

Comment
  1. Miguel Leeuwe
  2. Friday, 19 February 2021 18:18 PM UTC
ignore the @
  1. Helpful
  1. armando herrera @Appeon
  2. Friday, 19 February 2021 22:00 PM UTC
Please, use the password you have for your own sa profile.

(Make sure you are not leaving empty spaces).
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 20 February 2021 00:16 AM UTC
ok, yes that's what I thought. Seems to work (status 200), but still get errors when running the pb app.
  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.