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

SQLCA in a shared object (yet again)

$
0
0


I know, asked and answered - global variables are not available to shared objects. However...

 

I was looking at some old code of 11 years ago from a multi-threaded task manager that our company still uses. In most cases, SQLCA is passed in to the shared object as a user object of type transaction. In some cases, and in these cases the code seems to work fine, the shared object instantiates a nonvisual, and this nonvisual's methods use the global SQLCA. So to simplify my question - does an object instantiated by a shared object have access to the main application's global variables? By appearances, I'd say 'yes'. By the book, 'no'.

 

Larry


PBM_WINDOWPOSCHANGING

$
0
0

Hello all!

 

After searching MSDN and other sources for too large a fraction of an hour, I've come up dry trying to find the absolute values needed for flags/messages for WM_WINDOWPOSCHANGING to influence window behavior in various ways.

The MSDN pages for teh event have almost no detail for usage let alone a roster of values and/or links to the specs for the structures used.

 

Anyone know of a source for these values/definitions?

 

Thank you.

PowerBuilder MSXML2.DOMDocument.4.0 encoding issue

$
0
0

I have a very simple PowerBuilder code:

 

 

    OLEObject lole_DOM    lole_DOM = CREATE OLEObject    lole_DOM.ConnectToNewObject("MSXML2.DOMDocument.4.0")    lole_DOM.LoadXML('<?xml version="1.0" encoding="UTF-8"?><root/>')    MessageBox("", String(lole_DOM.XML))    DESTROY lole_DOM

 

 

And the result I get:

 

 

    <?xml version="1.0"?>    <root/>

 

Where did encoding attribute go? Not sure who to blame, PowerBuilder or MSXML2.DOMDocument.4.0, any ideas?

 

 

Using PowerBuilder version 11.5.1 Build 5097

PB 12.5.2 Classic - Exporting to XML export zero instead of null

$
0
0

Okay, I have found an answer, somewhat to this one, but wanted to put it here in case someone else finds it useful or has any further information.

 

We are using Powerbuilder 12.5.2 Build 5583 Classic and we are exporting a datawindow to XML using this code:

 

   ads.Object.DataWindow.Export.XML.MetaDataType = XMLSchema!

   ads.Object.DataWindow.Export.XML.SaveMetaData = MetaDataExternal!

 

   ls_validation_xml = ads.Object.DataWindow.Data.XML

 

Now one of the columns in ads is a long, and is set to null. However after the export the value in the XML is set to zero. The datawindow is a web services datawindow and that particular column has nillable="True", not sure if any of that matters but it may.

 

The way to fix this, and it sounds stupid to me, but I really tested it and it is true, is to add the column to the detail band, possibly any band, if it wasn't already there.

 

Basically if you have a datastore like I did that is never viewed by the user and therefore has no controls on it at all the export doesn't quite work properly! It seems strange to me, but if anyone has any explanations as to why this is so, and / or feels there is a good reason for it to act this way, please let me know so I can understand and document it.

 

Thanks.

Creating a Desktop Shortcut programatically

$
0
0

Can anyone help me with code to programatically create a shortcut on the desktop for a Powerbuilder Application?

At the least point me at the Windows API I need to use.

I need to guard against duplicates, etc.

TiA

Larry

ORCA script generating large size exe

$
0
0

Experts,

 

I wrote ORCA script to generate exe and pbds, but exe generated is too large (approx. 8 MB) compared to when the same exe (approx. 800 KB) is generated through PB IDE. Not sure what I missed in ORCA commands.

 

Two things to note....

 

- I don't generate pbd for the pbl having application object (same in PB IDE, I don't select pbd check box against that pbl)

- I have two pbds (pbejbclient115.pbd & pbwsclient115.pbd) in library list and not included build library command.

 

 

sample script that I wrote....

 

start session

set liblist ".\dir1\pbl1.pbl; .\dir2\pbl2.pbl; .\dir3\pbl3.pbl; .\dir4\pbejbclient115.pbd; .\dir5\pbwsclient115.pbd"

set application ".\dir1\pb1.pbl" "testapp"

build library ".\dir2\pbl2.pbl" "" pbd

build library ".\dir3\pbl3.pbl" "" pbd

build application full

build executable ".\testapp.exe" "test.ico" "c:\test\test.pbr" "nnnyy"

end session

 

 

Thanks in advance !
-Sandeep

PB 12.5.2 Classic - Web Services DW, no data after DeleteRow

$
0
0

Seems like it's yet another bug, thought this may be handy for anyone who runs into this in the future.

 

Create a Web Services Datawindow, do not map Insert, Update and Delete to anything. Retrieve data into and call DeleteRow, your data has just disappeared. It should be in the Delete buffer, but it isn't! It isn't anywhere!

 

The solution is to map the Delete in the Web Services Datawindow to something, anything.

 

The reason I didn't want to map is because I was handling the Delete myself, I just wanted to get the keys from the delete buffer and do my own thing. I'm starting to think I am the only person using Web Services Datawindows (apart from Chris Pollach who has either solved all these problems already or just been very lucky!).

Sysam problem - started after disk ran out of space PB 12.5.1

$
0
0

PB was working fine all morning.  I got a notification that i ran out of disk space.  so i cleared out space to get 4 GB back (standard disk clean up tool with option to clear out the system files too)

 

Starting PB I now get:

 

Failed to initialize SySAM licensing.

PowerBuilder is shutting down.

 

A mandatory property is missing.

 

Anyone know how to fix this?  I don't even get a chance to try to reapply the license.

 

It does say that you should turn logging ON.  I did that.

 

in the log is has:

2015/09/16 22:05:27  Checked out license for 1 PowerBuilder (2010.12250/permanent/.....

License Verified

 

then it has:

PB-SyLAPI Heartbeat Thread - terminated

2015/09/16 22:05:28  Checked in license for 1 PowerBuilder (2010.12250/permanent/...).

--SySAM/SyLAPI Terminated--


Controlling the location of a .NET form from PB Classic script

$
0
0

Hello, all

I have a .NET form, which is supposed to be opened in ShowDialog function from a PB classic window.

I need to specify the Left and Top position of the form based on the PB window location on a screen.

 

Let's say I know exactly the left and top offset of the .NET form on the window in PB Units. How do I translate these values into something .NET can understand?

Is the a built-in function for converting units into pixels?

 

Thank you

Arcady

Pover Builder V12 and Windows 10 Compatibility

$
0
0

Hi All,

 

Currently we have application developed in Power Builder v.12.0 and runs smoothly on Windows 7 and higher. We are getting questions from clients who want to upgrade their computers to Windows 10.  Are there any compatibility issues with Windows 10 and application developed in PowerBuilder 12? Mainly client run time.

 

Thanks,

Edmir

how to print barcode on the card and it read by scanner

$
0
0

Hi , i want to print the student code as a bar code  and it is read by scanner , how to do in power builder 7 or 12.

kindly help me.

Team Management Source control issue

$
0
0

Hello, all

I am having a very critical issue with Microsoft Team Management Source control when working with PB classic 12.5

 

When a new class is created inside a PBL and added to the source control, no other developer sees it after "get latest version" operation. The class is downloaded to the local machine, but never imported into the library.

 

Does anyone know how to fix that? This makes it impossible to work with MS TM...

 

Thank you

Arcady

Powerbuilder SOAP Proxy

$
0
0

Hey,

 

I have to call this https://entwicklung.innosystems.net/cgi-bin/xml/xml2.cgi?WSDL Services from my PB 12.6 Application.

 

I try to use the Webservice Proxy Tool. When clicking on Service I just get a white Window with some cryptic symbols and an Ok Button. (see Screenshot)

 

I put the wsdl into a SoapUI Project and there its working fine. So I dont think the problem is with the wsdl.

 

Ideas?

WS Header

$
0
0

Hello to all

 

I'm playing with the WS, in particular I have to use a WS requiring Header (user, password, ...)

 

I'm not able to initialize the header because I have an error when 'setauthheadervalue'.

 

I can not find anything on hand and no example in the Web.

 

What's wrong? You can help me ?

 

Ty

GImmy

 

 

p.s.

Attached

a) library

b) error

 

 

///////////////

// CODE //

///////////////

 

SoapConnection conn                                     // Define SoapConnectionws_

ws_persistentrequestservice proxy_obj             // Declare proxy

long rVal, lLog, ll_return

string ls_token, ls_accident

 

conn = create SoapConnection                        //Instantiated connection

 

ws_authheader ws_header

ws_header = create ws_authheader

 

ws_header.username = is_user

ws_header.password = is_pwd

ws_header.product = is_prodotto

//ws_header.role = '0'

//ws_header.actor = '0'

//ws_header.encodedmustunderstand = '0'

//ws_header.EncodedMustUnderstand12 = '0'

//ws_header.encodedrelay = '0'

 

proxy_obj = create ws_persistentrequestservice

 

 

proxy_obj.setauthheadervalue(ws_header)            <<<<<<<<<<=============HERE I HAVE ERROR

 

lLog = conn.SetSoapLogFile ("C:\mySoapLog.log")                   // Set trace file to record soap interchange data,

 

rVal = Conn.CreateInstance(proxy_obj, "ws_persistentrequestservice")

if rval <> 0 then

   messagebox ("Errore", "Errore nella creazione della connessione SOAP")

end if

 

// Create proxy object

try

    ls_token = proxy_obj.getauthenticationtoken('',ls_xml)

   // Invoke service

   messagebox("OK", "OK")

catch ( SoapException e )

   messagebox ("Error", "Cannot invoke Web service:" + e.text)

   // error handling

end try

 

destroy conn

Saving an excel file, doesn't seem to be setting date column

$
0
0

I'm using pb 12.5.2 classic

I'm doing a saveas to an excel file, and I have some datetime columns

when you open up the excel file, the columns don't seem to be formatted as date.   they columns are formatted as general

is there any way, that I can get the column to be formatted as a date or datetime ?


PB 12.5.2 JDK 1.5.0_06

$
0
0

My current PB and JAVA settings are:

 

PB 12.5.2 Build 5006

 

JAVA 1.6.0_24 (installed by PowerBuilder

 

Now ... interesting part is When CreateJavaVM method is executed, and debug option is TRUE, sometimes fails, some other not.

 

VM.OUT file reports class files loaded from: c:\program files\Sybase\shared\powerbuilder\jdk.1.5.0_06\jre\lib\rt.jar, also several files are loaded from same PATH, that doesn't exist.

 

If my actual JDK (also installed by PB) is .1.6, why classes are loaded from 1.5 and from a non existing path.

 

Please see Attached VM.OUT

 

Regards ...

 

AJPM

Hello America, what are you doing ?

$
0
0

Hello

 

 

We have to re-write a procedure that carries out processing and document bulk.

 

Specifically it is printing invoices.

As you have done in similar cases?

( it is the old concept of batch)

 

We are talking about a process that has to make a print of 2000/3000+ documents.

 

 

It is unthinkable make it in iterative mode and make the client wait for 30/60 minutes.

 

 

 

How do you solve cases like this?

 

 

Example process:

- Accounting for invoices

- Generation and print bills

- Print stock movements

- Etc ..

 

 

Ty for answer

Issue with Web Proxy PB 12.0 Classic

$
0
0

What needs to be deployed with the .NET proxy?

 

I imported the pbwsclient120.pbx into the pbl. I added the proxy DLL generated from the WSDL file.and libeay32.dll in the application directory. The compiled application works on my machine but not on a user's non-development pc On their machine I get a system error (Bad runtime function ) when trying to create the Proxy object. The same code is used in a server process and works perfectly. I feel I'm missing a deliverable but cannot figure which. Below is code snippet used blows on the highlighted line :

 

*** User function call **

claimsfnolmanagerservicewsv10service proxy_obj // Declare proxy

 

int iRet

long ll_return

string ls_string

long rVal, lLog

boolean lb_value

real amount

string str_endpoint, s_sometext

pingrequest l_pingreq

pingresponse l_pingresp

businessservicetype l_BusSvctype

servicerequestinfotype l_ServReq

 

 

// Security Objects

security l_security

security l_security_values

securityusernametoken l_SecToken

securityusernametokenpassword l_SecTokenPswd

 

 

// Create SOAP Connection

conn = create SoapConnection  //Instantiated connect

 

 

 

l_SecToken.username             = ps_username

l_SecTokenPswd.value             = ps_password

l_SecTokenPswd.ws_type         = ps_ws_type

l_security.mustunderstand = false

 

 

str_endpoint = ps_endpoint

 

 

// These are not used by the process but cannot be NULL or security object will not generate the appropriate Header info

// Loading default values

l_security.didunderstand = true

l_security.relay = true

l_security.actor = ''

l_security.encodedmustunderstand = '0'

l_security.encodedmustunderstand12 = '0'

l_security.encodedrelay = '0'

l_security.role = ''

l_security.usernametoken                 = l_SecToken

l_security.usernametoken.password = l_SecTokenPswd

 

 

//Create Proxy Object

rVal = Conn.CreateInstance(proxy_obj, "claimsfnolmanagerservicewsv10service", str_endpoint)

 

Return proxy_obj

pb@Mazda

Viewing datawindow data in debugger

$
0
0

Does anyone have any handy add-on / tools / tips for viewing datawindow data, row and item statuses, buffers, etc. when debugging?

 

I started to write my own tool a while back, but never found the time to finish it. Others I know do a SaveAs to Excel format to get the data, but it would be really nice to see all the datawindow information there is. I honestly don't understand why this was never added to the debugger over the years.

Viewing all 2935 articles
Browse latest View live


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