Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all 2935 articles
Browse latest View live

Powerbuilder 12.6 - Saved Password disappeared at DB Profile(Not happned in PB 12.5.2)

$
0
0

env : OS-windows7 64bit  db-Oracle10g   PowerBuilder-version 12.6

Problem : In Powerbuilder 12.6, the saved Password is disappeared at DB Profile setup as below, hence they hit ORA-1005 null password given;logon denied.

 

They don't want to enter the password everytime. Is there anyone advise how to solve it ?

Our customer is very new to PB 12.6 and in the previous release it won't happen.

PB126_error.pngMany Thanks!


PB 12.6 64-Bit Windows Applications - Grid Table unsupported

$
0
0

I was reading this article on deploying 64-Bit applications with PB 12.6 and I was puzzled by one of the items listed in the unsupported features.

 

http://help.sap.com/saphelp_pb126/helpdata/en/2f/8c548ab5781014944b973cfbb2dec1/content.htm?frameset=/en/2f/8c548ab5781014944b973cfbb2dec1/frameset.htm&current_toc=/en/2f/16f291b5781014af9ce45f1ca8d7d2/plain.htm&node_id=12

 

Can I get further details on the "Grid table" item listed under unsupported features?

 

Is this regarding the Grid section for grid datawindows?  If so, what exactly isn't supported in 64-Bit?

 

Regards,

Mike

 

http://help.sap.com/saphelp_pb126/helpdata/en/2f/8c548ab5781014944b973cfbb2dec1/content.htm?frameset=/en/2f/8c548ab5781014944b973cfbb2dec1/frameset.htm&current_toc=/en/2f/16f291b5781014af9ce45f1ca8d7d2/plain.htm&node_id=12

Good old OLE - extracting documents from database blobs

$
0
0

I am developing code to take documents stored as OLE objects in the database and save them all to file.  We have a mix of PDFs, Word documents, Excel documents, TIFFs and various other files. I have developed code to handle all documents other than Word/Excel without needing to activate an OLE control or OLE object but for Word and Excel  I seem to be forced to use an OLE Control which means a lot of flashing… Here is my technique for non Office documents: Write blob out to file as scratch.ole file Open file in to an OLEStorage object Based on the original file type if it is PDF use a OLEStream label of ‘CONTENTS’ otherwise use a label of char(1)+’Ole10Native’  (How yucky is that!) Open the stream based on the OLEStorage/Label Read the OLEHeader block from the stream and based on the file type determine the starting position and length of the data. Dump this data to file. For Office documents, I open an OLEControl and load the document into that using objectdata assignment.  I then activate the document OffSite! (InPlace! Does not seem to work with SaveAs) and then call the object saveas method. E.g. l_ole_pointer.object.application.ActiveDocument.saveas(ls_save_filename) So here are my challenges: 1) I would love to be able to extract the word document from the stream directly with OLE Activation but if I have a  complex word document that has embedded OLE objects then there are multiple OLE streams and it gets nasty – simple documents I can handle… OR 2) Use OLEAutomation using an OLEObject but I cannot figure out how to load an OLEObject from a blob – there is no equivalent to OLEControl.objectdata=lblb_blob OR 3) Use an OLEControl but activate InPlace! – I cannot get the saveas method to work for Office document when I do this. Any Ideas? Thanks, Mark

12.6 SCC Issues

$
0
0

Had 9.0 on my system, and was able to use SCC option for MKS (Integrity Client 2009) source control just fine.  Once 12.6 eval (Build 3506) was installed, it broke the SCC for both PowerBuilder versions.  I thought maybe it just needed a fresh install of MKS, so I uninstalled MKS 2009, and reinstalled, no change.  The specific error when trying to connect to MKS for both PB versions:

 

     Title: OpenSSL: FATAL

     Message: OPENSSL_Upink(56D42000,08: no OPENSSL_Applink

 

Anyone else run into any SCC issues with this release??  Haven't been able to find much on this error on the web yet.  I'm wondering if the updated SCC DLL in the shared folder for PB got messed up since they both return the same exact message now.  Again, "nothing" has changed on the PB 9.0 installation.  Just the install of the 12.6 eval version.

 

Thanks in advance!

--Brian

Using NetTcp instead of Http accessing your WCF Service

$
0
0


I've been doing a lot of WCF lately (mostly in VS) and wanted to share some of my experience and knowledge with my PB brothers and sisters. If you are working with WCF on both ends (client and server) you have the option of using NetTcp instead of Http. NetTcp is faster than Http so you'll want to consider this option if it's available. For more info on the hows and whys ask the internet. I only know enough to be dangerous so let's get to it!

 

I used PB 12.5.2 for this but any 12.5 version or above should suffice.

The agenda...

1. Create a WCF service in PB.Net that retrieves data from the demo db and create a PDF from it. Return the PDF as a blob.

2. Configure the service with 2 end points: BasicHttp and NetTcp

3. Install Windows Process Activiation Service (WAS)

4. Create a WPF client using PB.Net to call the WCF Service.

5. Create a Win32 client using PB Classic to call the WCF Service.

 

Create the WCF Service

Open up PB.Net

If you don't have a workspace created go ahead and create one.

Right click on your workspace and add a new target of type WCF Service

Go through the wizard. You can take the defaults if you like but I prefer to put each target in its own folder.

Go ahead and select 'Custom Nonvisual' as the initial object to create.

I like to name the virtual directory something useful too. _wcfservice just doesn't light my fire.

Now create a datawindow that retrieves all columns from the employee table.

Make the where clause where dept_id = :ai_dept_id

Save the datawindow as d_grid

Create a new nvo with two instance variables.

blob ib_pdf

string is_error_msg.

Save it as n_ret. We will use this to return the PDF document

Open the nvo the wizard created for you. It will be called n_customnonvisual if you took the defaults.

Create a function on it called of_create_pdf that takes an integer argument and returns a n_ret (the nvo you created earlier).

Paste the code from the attachment of_create_pdf.txt into your function.

It basically connects to the db, retrieves the data into the datawindow, creates a pdf file, creates a blob from the pdf file, deletes the pdf file on the server and returns the blob as part of n_ret.

Save your nvo and close it.

Open the project file.

Expose your function to create the pdf by checking the box. Rename it if you want to.

Set the Operation Attribute STAOperationBehavior.

Here's an example...

Capture.PNG

Copy the web service url to the clipboard. You'll need it later.

 

Configure the WCF Service using the Service Configuration Editor

Locate the config file in your target. It should be the only one with a 'config' extension in your solution explorer.

Right click on it and select 'open with' then click the Add button

Click the ellipse button and navigate to the following file... C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\SvcConfigEditor.exe

Enter a friendly name to name it and click Ok. You now have the Microsoft SDK WCF service configuration editor in your PB arsenal.

Select it from your list and open your config file.

Capture.PNG

Right click on the 'Bindings' folder and add a new binding configuration.

Select basicHttpBinding and click Ok.

Increase all values in the general section that have 65536 to something bigger. I chose 1048576.

Change all the zeros in the Reader Quotas section to 1048576 too.

Make the name something meaningful like BasicBindingMax

Create another binding configuration but this time choose netTcpBinding.

Set its values to the same as the basicHttpBinding values.

Now locate your service in the services folder at the top of the tree.

You should see two endpoints in your service. One for basicHttpBinding and one for MexHttpBinding.

Locate the name field in the grid and give each a name so that '(Empty Name)' doesn't show up in the tree.

Set the binding configuration for your basicHttpBinding to the basic binding you just created. Its probably the only option.

Now right click on the EndPoints folder and add a new endpoint.

Set the binding to netTcpBinding

Set the binding configuration to the netTcp one you just created earlier. Again its probably the only option.

Name your netTcp endpoint.

Save your changes and close the config editor.

Here's an example...

Capture.PNG

Build and deploy your WCF using the project painter.

 

Install WAS (Windows Process Activation Service)

 

Go to Control Panel and bring up the add/ remove windows features and install WAS...

Capture.PNG

Now install .Net 3.5 Framework

Capture.PNG

Go to Component Services and start the WAS service

Capture.PNG

 

Launch IIS Manager (InetMgr)

Create a pdf folder under your WCF Service and give Authenticated Users write access

Select the Default Web Site

Click Advanced Properties

Add net.tcp to the Enabled Protocols property...

Capture.PNG

Do the same thing for your WCF web service by selecting it and going to Advanced Properties.

 

Now your ready to test your web service configuration.

Launch the WCF Test Client app ("C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\WcfTestClient.exe")

Point to your web service url from your project file (it should be on your clipboard so just paste it)

You should see both your basicHttp and your netTcp end points exposed...

Capture.PNG

They won't work because PDFs are too large for the default settings of the WCF Test Client. We just wanted to verify that the end points were exposed.

Now lets create some clients and show some PDFs!

 

Create a WPF target in PB.Net

Add a window

Add code in the app open event to open the window

Add a new wcf client proxy project that points to your service

Generate the proxy using the proxy project

Save your proxy project changes and close the project painter

Add a button to your window that will be clicked to call your web service

Add a single line edit to capture the dept id, two radio buttons to capture the binding preference Http or NetTcp, and a web browser control to display the PDF

Paste the code from click.txt into the clicked event of your button

This code creates a client proxy, assigns the connection based on the binding selected, increases the buffers to hold a PDF file, calls the service, then displays the PDF using a web browser control

Here's an example of the GUI...

Capture.PNG

Now run the WPF app and see if it works using  either binding.

 

Last but not least lets create a Win32 client with PB Classic

 

Create a regular PB app

Add a window that has a button, sle, two radio buttons and a web browser control

You will need to add the proper registry entries for your service in order for PB to find it

Bruce has covered this very well so I won't go in to that.

Add the PB web service extension to get the soap objects (pbwsclient125.pbx)

Add the code in the attachment win32_click.txt to the clicked event of the button

It should look something like this...

Capture.PNG

Run the app and see if it works using either binding.

 

This was a long post and exposed you to several different programs. I hope you got something out of it. I can post the code for all three programs if desired.

 

Thanks and Good Luck!

Mark

can I declare and execute RPCFUNC from one windows function

$
0
0

Hi

I don't know I am asking a stupid question. If it is, please sorry for that

 

Is there anyway to declare and call RPCFUNC from windows function.

 

Regards

Pol

PB 12.6 64 bit deploy & OLE DB (not)

$
0
0

I'm working on migrating a 12.5 to 12.6 app.  The app connects to MS SQL Server  2012 via OLE DB

Once migrated, the app connects fine when deployed as 32 bit pCode

 

Then I build a simple POC to test 64bit connectivity.  MSS 64 bit Client is installed. Connectivity fails.

 

Then a colleague notices on Runtime Packager that OLE DB driver is disabled when 64 bit is connected!

2014-10-07 11_07_24-PowerBuilder Runtime Packager.png

 

I switch to SNC driver and can connect fine.  Will I need to change my driver support?

 

Doc does not mention anything about NO 64 bit support.  Just says

"The OLE DB interface uses a DLL named PBOLE126.DLL to access a database through an OLE DB data provider"

 

What's going on here?

 

Thanks

 

Yakov

PB 12.6 Issues with 64 Bit Executable

$
0
0

Good Day!

 

I have migrated my PFC-based application to PB 12.6.

 

First Issue:

 

Using a 64 Bit deployment, my application crashes when a very simple function call is made:

 

SQLCA.of_SetMyVariable( TRUE ) /* All this does is set an instance variable in my transaction object (n_tr) */

 

The app crashes and halts immediately. I get no meaningful messages. I ran it with /PBDEBUG and I saw that a runtime error was incurred, but nothing meaningful. If I comment out that call, the application continues just fine. When testing, I put some message boxes in to see, for certain, whether or not this was the culprit and it is. The code never gets into the function, itself. It fails when it tries to call it.

 

Obviously, all works just fine in the IDE (32 bit) and a 32 bit executable.

 

Second Issue:

When I use the runtime packager and try to create a 64 bit MSI, I get an error stating file pbrth126.dll cannot be found. I've tried with and without DB Interfaces and Other Components. The file does exist but it's in C:\Program Files (x86)\Sybase\Shared\PowerBuilder\x64 and the packager is looking for it under C:\Program Files (x86)\Sybase\Shared\PowerBuilder. Has anyone else hit this? Is this a known issue?

 

Any assistance would be appreciated.

 

Tom


Installing 12.5.2 EBFs

$
0
0

I installed version 12.5.2.  It works fine.  I then wanted to install one of the EBFs to fix a problem.  When running the Setup program for any of the 6 EBFs I get this error message:

 

Image1.jpg

However, I have this version installed:

Image2.jpg

From the Installation file:

 

The minimum requirement for applying this EBF is the PB 12.5.1 Maintenance
(Build 4015)or PB12.5.2 GA (Build 5006).

 

Has anyone installed an EBF for version 12.5.2 successfully?  If so, what is the secret?

 

Thanks for the help,

Randy

 

PS - Tried to create an "Incident" using my Super Duper S user account but that could not be done for PB.  That's another story for later.

getrow() not return proper row number after using the modify() function

$
0
0

Hi Everyone,

 

I am using PowerBuilder 11.1 build 8123.


I am protecting the column and changed the background mode of data window column through modify() function in user defined local function (where datawindow is argument type and pass by is reference). Data window have more than one row and one selected row. Before modify the column's, getrow() function return right selected row, but after modify it return any other row number. code is written in fwc_retrieve event.

 

I also use scrolltorow() and setrow() functions after modify(), but these have not worked.

 

In my application PFC is used. I don't able to find out the reason.

 

Please help.

 

Thanks,

Vikrant

ORCA crashing, are there things to look for in code?

$
0
0

Hello,

 

I am automating our build process and I am using Roland Smith's PBORCAPI.dll and PBSCCAPI.dll products (nice job Roland).  Anyhow...  I have PBDs working, but DLLs crash.  I know it isn't the Roland's code libraries nor my build code, because the POWERGEN demo fails at the same PBL/DLL as does Roland's sample app.  I am assuming there is something in the code (the application being build, not the build process code) that is causing the issue.  Are there known issues or things to avoid?  The application is currently running under 9.0.2 7509 and deploys fine to PBDs and DLLs from within PowerBuilder.  Any ideas?

 

Thanks in Advance,

Christopher

Will PB 12.6 Manuals be available in pdf?

$
0
0

I would like to mention that we don't have manuals in pdf (like sybase used to do and sap continues to do for other products). For PB 12.6 we only have 3 documents as you can see in the following link: SAP PowerBuilder 12.6 – SAP Help Portal Page. For other products (like powerdesigner) they released a full set of manuals (SAP PowerDesigner 16.5 SP04 – SAP Help Portal Page). Why not for PB? (The last set of manuals is for PB 12.5.x).


Thiswilllikelyhelpnewdevelopers touse the product!

 

Andreas.

DDE server option hanging the application

$
0
0

Hi,

 

My application uses DDE to exchange the data between two Powerbuilder applications[GetRemote ()]. But recently we are facing the issue application not responding. We are uising StartServerDDE to establish the application as DDE server and GetRemote() function to exchange the data.

In our initial analysis we found the application get struck at the point of GetRemote() function call.  We are using windows 7 (32 bit & 64 bit) nad code is built in PowerBuilder 12.0.

Any help will be appreciated!

 

Thanks & Regards

Babin A B

please help stored procedure not executing

$
0
0

My  code is as follows

DECLARE spgetname PROCEDURE FOR spGetName @Customer = :ls_customer, @Type = :ls_type, @CName = :ls_name  OUTPUT USING SQLCA; EXECUTE spgetname ; do while sqlca.sqlcode = 0 FETCH spgetname  INTO :s_message; if sqlca.sqlcode = 0 then MessageBox( "s_message", s_message) end if Loop

 

I am using pb11.2 and SqlServer snc connection. the procedure is not calling. Even when I am giving wrong procedure name , no error message is coming. Please looking for your help Regards Pol

Any news about Powerbuilder 15 or future roadmap from July-2014?

$
0
0

Does anybody know some news about Powerbuilder 15 or future roadmap fom July-2014?


release date of powerbuilder 15

Windows DLL in CITRIX Environment : PowerBuilder 12.5.2

$
0
0

i am using PB 12.5.2...


advapi32.dll, mpr.dll is working fine in Windows Env. while calling functions as..


WNetGetUser or LogonUser ...  to authenticate the user with windows username and password.

 

 

 

I want to know if this can work well in CITRIX Env. also.


i am worried because i have found some people getting error as 'DLL not found..."




Should i need to paste those DLL to Citrix? or i have to do anything else?

 

 

 

 

please help

Powerbuilder 12.5 database connectivity issue

$
0
0

Hello,

 

We are trying to migrate our application from powerbuilder 9 to 12.5. The migration and compilation of files from the previous version is completed successfully. We have also been able to run the application with the database connnectivity.

 

However, the application does not run in a specific scenario. When we load the workspace first and then make the database connection we are not able to successfully run the migrated application and we face the following error:

"Oracle 10g is not installed or Oracle10g is not Primary Oracle Home on your machine".

On debugging we found that this error is thrown at the following line ' Connect using SQLCA'.

 

On the other hand, if we make the database connection first on opening PB12.5 and then load the workspace and try to run the application, it runs successfully.

 

We thought the error message that appears in the first case does not make much sense as Oracle 10g is installed on the machine and the path is set appropriately and also given the fact that  the application runs when the database connection in performed first.

 

We are pretty much clueless as to why we face this issue. Any help on this would be highly appreciated.

 

Thanks in advance.

New laptop, PB 11.5 licensing questions

$
0
0

It seems that my company will get me a new laptop because the old one became so crappy that it is almost non-functional.

 

My only drawback is that I always had issues when changing PCs with PB licensing.

 

My PB 11.5 lic is linked to my network card I guess.

 

So, with having SAP into play now, if I get a new laptop what is the procedure to move my lic into?

 

Thanx in advance!

Is there a future after PowerBuilder 12.6?

$
0
0

Could someone at SAP elaborate on this topic?

Viewing all 2935 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>