Quantcast
Channel: SCN : Discussion List - PowerBuilder Developer Center
Viewing all 2881 articles
Browse latest View live

Connection Security

$
0
0

Hi All,

 

Trying to flush out the issues with security for a PB app connecting to MS SQL Server.  It occurs to me that if someone has access to the .exe they could use a hex editor to peek in side.  I tried it and sure enough the connection password is plainly visible.  Is the answer for this to compile to machine code?  Does that work to obscure it?  Any other suggestions?  I'm hoping there's a best practice for this out there somewhere.

 

Thanks.


data insert problem

$
0
0

hi all...

when i insert values in to SQL database through power-builder application the data is not in order. they are randomly stored.. what should i do to save the data in SQL in order. 

 

with regards,

Delna

Composite Report with blank page (last page)

$
0
0

Hi All,

 

i have created a composite report with 2 datawindow. But encountered the last page of the composite report to be always blank.

 

tried to print the 2 datawindow individually and they work fine without any blank page.

 

powerbuilder : 12.5.1 build 4595

 

anyone have such encounter and manage to resolve ?

 

Rgds,

Chee Boon

pb 11.5 connection to TLS1.1 webservice

$
0
0

Hi all,

 

I have a simple answer, but I find no answer on Google.

 

Is it possible to communicate from a pb 11.5 application with a webservice secured by TLS 1.1?

The webservice client is made by the .NET engine, so it rely on .NET framework 2. Is this enough?

 

When I try on their test server, I get only (failed) sslv3 handshakes.

The other party will end the SSL security and asked a minimum of TLS1.1.

 

 

So, if it can, must I do something with certificates?  Or something else?

 

Develop environment:

PB 11.5.1 Build 4608

Win 7

 

Regards

Danny

DW Painter question

$
0
0

I have a tabular datawindow that is designed and I want to change the name of on of the database columns. No other changes but in the name.  When I do this the DW resets back to the defaults destroying hours of work. Is there a way to prevent this behavior from occurring.  Can I edit a SRD file directly searching and replacing the original column name?

 

Thanks

TPS

Type Casting in PowerBuilder .NET 12.6

$
0
0

Well, yes I suppose I'm in denial<g> but...

 

Can anyone proffer (malaprop?) a workaround to the prohibition against direct type casting to achieve the equivalent of...

 

[C#]

  // Creates an IPEndPoint to capture the identity of the sending host.

  IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);

  EndPoint senderRemote = (EndPoint)sender;

 

...or even...

 

[Visual Basic]

  ' Creates an IPEndPoint to capture the identity of the sending host.

  Dim sender As New IPEndPoint(IPAddress.Any, 0)

  Dim senderRemote As EndPoint = CType(sender, EndPoint)

 

...hmmmm?

 

Thank you very much.

PB Newbie

$
0
0

Hi, I want to learn PB. If I may ask, where will I start to know the basics?

 

Thank you!

Powerbuilder Excel Setremote Error

$
0
0

Hi,

This is my code;

 

 

 

long handle, i, exsat = 3, sbul

integer varmis

 

 

sayfa1 = create OLEObject

VARMIS = sayfa1.ConnectToNewObject ('excel.sheet')

IF VARMIS <> 0 THEN

  messagebox("Dikkat","excel not found")

else

  messagebox("Bilgi","excel found")

END IF

sayfa1.application.visible = True

Sayfa1.Application.ActiveWindow.WindowState = 2

 

 

handle = OpenChannel("Excel", "Sheet1", HANDLE(w_test))

if handle <> -1 then

 

  messagebox("Bilgi","Sheet1 connection is open")

 

  SetRemote("R2C1", "value-1", handle)

  SetRemote("R2C2", "value-2", handle)

  SetRemote("R2C3", "value-3", handle)

end if

 

 

 

 

Sayfa1.Application.Cells.Select

Sayfa1.Application.Cells.Font.Name = "Arial Tur"

Sayfa1.Application.Cells.Font.Size = 8

Sayfa1.Application.ActiveCell.Select

 

 

CloseChannel(handle, Handle(w_test))

 

 

 

 

Code is not working one computer, windows10-office 2010 installed. Code working until this line,

 

 

handle = OpenChannel("Excel", "Sheet1", HANDLE(w_test))


and waiting, not responding.



Thanks


What is your prefered source control version tool ?

$
0
0

What source control version control tool are you using with PowerBuilder ?

What is your prefered one and why ?

RegistryGet and RegistrySet not working in PowerBuilder 12 on Windows7 and windows 2012?

$
0
0

Hello,

 

I want to read/write the Dword type of registry value. Using API function works, but RegistryGet and RegistrySet didn't work...
String REG_KEY = "KEY_CURRENT_USER\Software\Adobe\Acrobat Distiller\9.0"
Int LiRet
Ulong lTemp


LiRet = RegistryGet(REG_KEY, 'DistillerPrinterFontCache', ReguLong!, LTemp)

 

Value in registry is 1, but it is returning 0?

 

Thank you!

 

-Ping

Error when generate exe file - Creation of executable failed

longptr datatype error on PB 12.6

$
0
0

Hi everyone,

 

I migrated an application from PB 12.5.1 to PB 12.6 build 3506, and the migration assistant didn't show me errors during the process. I am using Windows 7 and it is updated.

 

I began to test the application on PB 12.6 and when it was trying to retrieve a datawindow the application shows me the following error: "Retrieve argument 1 does not match expected type." This error is occurring in many events.

 

The datawindow (dw_1) has an event where is called the retrieve function, and the event has an Argument  which datatype is longptr. On PB 12.5 it was a Long datatype.

 

The option I found to solve it, is converting the argument to a Long datatype before retrieve the datawindow, for example:

 

LONG lparam2

 

lparam2 = Long(lparam) // lparam is the argument (see attachment)

 

dw_1.Retrieve(lparam2) // Replaced script: dw_1.Retrieve(lparam)

 

 

My question is: Is it possible to fix this error in a different way? I can modifiy several events, but I want to know if is a PB bug or is normal on this PB version.

 

Thank you very much, I appreciate your help.

 

 

Luis G.

 

 

P.D. I was reviewing the discussions on this network, the updated PB builds, and I didn't find something that helps me with this issue.

TabControl - Event for Activate/Deactive Tabpage

$
0
0

This is an interesting problem that I've been tasked with...

 

In a Windows application with a Tab Control and custom user objects as the pages, how long (in seconds duration) is each tab page visible/active to the user?

 

It's interesting task because as you know, if the tab is active and the application is deactivated (not the active application), the timer on the page should pause.  Also, as the user tabs through the application, the tab page that isn't being viewed should also pause, and restart when the current page.  So, lots of events being triggered, but I'm not sure if there's an easy (foolproof) way to determine if a tab page is both active and currently visible.

 

Are there any events that capture when a tab page is active and not active?  I've been using the C++ Spy tool and there is a WM_USER + 1037 message that seems to be thrown which might work.  But the wparam that is coming back is not seeming to correspond with anything known - perhaps a handle?

 

Any thoughts on how to accomplish this now seemingly daunting task?

 

Thanks,

Brian

 

 

p.s. PB12.5/Windows7

Office 2013 ole

$
0
0

Hallo,

 

We are experiencing problems trying to automate MSword from Office 2013 on a windows 7 machine , using Powerbuilder 11.5. the same setup with office 2010 gave no trouble.

 

This is our code :

 

long ll_return , ll_test

string ls_test

n_oleobject_word  lole_word

OLEObject  lole_doc, lole_selection

lole_word = create n_oleobject_word

ll_return = lole_word.ConnectToNewObject('word.application.15')

lole_doc = CREATE OLEObject

lole_doc = lole_word.Documents.open('L:\Dev\APBS_KLANTEN\DOX\docs\offerte_test.docx', False, True, False, "", "", True, "", "", 0)

lole_doc.bookmarks.Item('ve_stad').Select()

lole_selection = lole_word.application.selection

ll_test = lole_selection.BookMarkID  // ll_test gets the correct value

ls_test =  lole_selection.text  // ls_test gets an empty string which is correct

lole_selection.TypeText('this is a test')

 

 

Everything seems to be going fine until the last statement. At that stage we get the following errormessage:

 

"Error calling external object function typetext at line 13 in clicked event of object m_7 of m_apbs."

 

We think it might have something to do with an office setting  or permissions to alter a word_document .

 

We would be most gratefull for any suggestion.

 

Kind regards,

 

Paul Baudouin

MSSQL :: OleDB --> SNC

$
0
0

Hello PB Masters!

Our flagship app currently uses OLEDB to connect to MSS SQLServer 2010.  There is no OLEDB driver for 12.6 64bit also  Appeon for PB only has a native MSSQL driver.

 

My management asked this question that I don't have perspective (other than doc) to answer

"Any performance or other differences between OLEDB and SQL Native"

 

I would assume at least one driver layer is removed thereby giving some measurable performance gain. I would also assume that there are driver specific options with a vendor native driver than with a generic driver

 

What are your experiences and findings?

 

Thanks

 

Yakov


I am getting error on calling external function Navigate(Other functions also) of Microsoft Web Browser using OLE in our application.

$
0
0

I am using PowerBuilder 12.6 on windows 8.1/10  64-bit system. In my application an OLE control Embedded with Microsoft Web Browser and it is used to Browse and select files.

 

With Source files(PBLs), application runs smoothly.

EXE built for 32-Bit platform works fine.

Error occurs only in EXE built for 12.6 64-Bit platform.

 

Anything extra I have to do, to run EXE in 64-bit system?

 

Is there any alternative for (OLE) control of Microsoft Web Browser?

Powerbuilder Classic calling webservice and get message "can not be reflected"

$
0
0

We are switching to Ultipro Saas offering, so I need to convert a program that synchronizes data to use Web Services instead of the direct DB connection we had before.

 

I created the proxy using .NET, but when I run authenticate I get the message "Method LoginService.Authenticate can not be reflected"

 

I'm not sure what I am doing wrong

 

li_ret = s_conn.createinstance(u_soap,"LoginService")

u_soap.setclientaccesskey( lws_client )

u_soap.setuseraccesskey( ls2_userkey )

u_soap.setusername( ls3_user )

u_soap.setpassword( ls1_pass )

u_soap.authenticate( ll_status, lb_status, ls_msg, ls_token )

 

 

 

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:i0="http://www.ultipro.com/services/loginservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" name="LoginService" targetNamespace="http://tempuri.org/">

<wsp:Policy wsu:Id="WSHttpBinding_ILoginService_policy">

<wsp:ExactlyOne>

<wsp:All>

<wsaw:UsingAddressing/>

</wsp:All>

</wsp:ExactlyOne>

</wsp:Policy>

<wsdl:import namespace="http://www.ultipro.com/services/loginservice" location="https://service2.ultipro.com/services/LoginService?wsdl=wsdl0"/>

<wsdl:types/>

<wsdl:binding name="WSHttpBinding_ILoginService" type="i0:ILoginService">

<wsp:PolicyReference URI="#WSHttpBinding_ILoginService_policy"/>

<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>

<wsdl:operation name="Authenticate">

<soap12:operation soapAction="http://www.ultipro.com/services/loginservice/ILoginService/Authenticate" style="document"/>

<wsdl:input name="TokenRequest">

<soap12:header message="i0:TokenRequest_Headers" part="ClientAccessKey" use="literal"/>

<soap12:header message="i0:TokenRequest_Headers" part="Password" use="literal"/>

<soap12:header message="i0:TokenRequest_Headers" part="UserAccessKey" use="literal"/>

<soap12:header message="i0:TokenRequest_Headers" part="UserName" use="literal"/>

<soap12:body use="literal"/>

</wsdl:input>

<wsdl:output name="TokenResponse">

<soap12:body use="literal"/>

</wsdl:output>

</wsdl:operation>

</wsdl:binding>

<wsdl:service name="LoginService">

<wsdl:port name="WSHttpBinding_ILoginService" binding="tns:WSHttpBinding_ILoginService">

<soap12:address location="https://service2.ultipro.com/services/LoginService"/>

<wsa10:EndpointReference>

<wsa10:Address>https://service2.ultipro.com/services/LoginService</wsa10:Address>

</wsa10:EndpointReference>

</wsdl:port>

</wsdl:service>

</wsdl:definitions>

PowerBuilder 12.6 will support Web Service Security on SoapConnection

$
0
0

Hi ,

 

I just came cross the situation where we need to include the WebService Security (Wsse) on soap header to authenticate against the web service. But in the PowerBuilder 12.6 Classic SoapConnection object doesn't have any method to support this feature to include in Soapheader.

 

Anyone guide how to implement this token based authentication in the PowerBuilder 12.6 Classic. Greatly Appreciate you support.

 

If there is no option, then we have to PowerBuilder.NET WCF assembly

 

 

Thanks,

Balu

pb 11.5 connection to TLS1.1 webservice

$
0
0

Hi all,

 

I have a simple answer, but I find no answer on Google.

 

Is it possible to communicate from a pb 11.5 application with a webservice secured by TLS 1.1?

The webservice client is made by the .NET engine, so it rely on .NET framework 2. Is this enough?

 

When I try on their test server, I get only (failed) sslv3 handshakes.

The other party will end the SSL security and asked a minimum of TLS1.1.

 

 

So, if it can, must I do something with certificates?  Or something else?

 

Develop environment:

PB 11.5.1 Build 4608

Win 7

 

Regards

Danny

Randomize powerscript function

$
0
0

We have a client questioning our random numbers being generated.

We always use the powerbuilder Randomize(0) function.

then... Call Rand

 

They want to know, how many seed values that are available

How many different seeds can Randomize produce?

is it the size of the max int?

i read in the help that it's based on the system clock

is there further documentation / code on the Randomize function?

 

the version that we are using at that location is 12.1  (if that would make a difference)

 

Thanks

Viewing all 2881 articles
Browse latest View live


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