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

About PB 15 Category in forums...

$
0
0

Hi. I wanted to ask if PowerBuilder 15 Beta Category is still in use or if there is no meaning in posting new messages to that category... I ask as I don't see any recent activity here.


Andreas.


PB/PBSSC-proxy setup failure...any help accepted

$
0
0

I am using TortoiseSVN 1.8.5, Build 25224 - 32 Bit , 2014/02/18 20:05:11, Subversion 1.8.8, and PBSCC-Proxy 2.0.1.80 to retrofit SCC on a PB9 application.  I have created the SVN repo, work structure, and setup PB with the PBSCC proxy.  When I click to finish, attached message displays.  Eventually, I get the +'s to show up in PB, but no menu options to 'Add to Source Control'.  There is no svn.exe with this version of TorSVN.  There are several, with one named 'TortoiseProc.exe'.  Is this a conflict of versions, something missing, or a bad install?

PB 12.5 Webform - Send PDF as attachment

$
0
0

Greetings all,

 

It's been a LONG since I posted to a PowerBuilder Newsgroup (or whatever this is).

 

I think I have a simple problem. I hope. For years I have used some code to save a datawindow as a PDF attachment and email it as an attachment.

 

So now I have a new project and for the life of me, I cannot get it to work.

 

I would really appreciate it if someone could take a look at the code and help me.

 

Question 1: Can I finally get rid of helper.dll to map the path to the virtual path (e.g., c:\inetpub\wwwroot\mywebform\u7ru84ir93ur829o\c\mypdf.pdf)

 

Comment 1: My code compiles and displays the message ("Your receipt has been emailed to the requested recipient at " + user_id) which I think means that the returncode from **returncode = dw_1.SaveAs(filepathname,PDF!,false)** is not returning a value of 1.

 


user_id = trim(user_id)

string bodytext
bodytext = 'Dear PDF Viewer, ' + '~r~n' + '~r~n' + 'Please find attached the requested manifest in PDF format.' + '~r~n' + '~r~n' + 'Thank you,' + '~r~n' + '~r~n' + 'Ajax Operations' + '~r~n' + '1-888-888-8888'

 

string filename
string filepathname

 

//create the path to use LATER for the attachment

 

#if defined PBWEBFORM then


//this does not work!!
//filepathname = Helper.PBInternal.ConvertVFS2ActualPath("c:\MyPDF For-" + string(today,"MM-DD-YYYY") + ".pdf")

 

filepathname = MapVirtualPath("c:\

 

MyPDF For-" + string(today,"MM-DD-YYYY") + ".pdf")


//create the path and filename to use NOW to distill and save the file in the virtual directory

filename = "c:\MyPDF For-" + string(today,"MM-DD-YYYY") + ".pdf"

long returncode
returncode = dw_1.SaveAs(filename,PDF!,false)

if returncode = 1 then

 

string subject
subject = "MyPDF For-"+string(today,"MM-DD-YYYY")
string fromaddresstext
fromaddresstext = "abc@abc.com"

 


System.Net.mail.MailMessage message
message = create  System.Net.mail.MailMessage
message.subject = subject
message.body = bodytext

 

 

System.Net.Mail.MailAddress fromaddress
fromaddress = create System.Net.Mail.MailAddress("abc@abc.com", "PDF Operations")
message.From = fromAddress

 

System.Net.Mail.MailAddress toaddress
message.To.Add(user_id);

 

 

//TEMPORARILY COMMENTED OUT UNTIL WE CAN GET THE PATH THING FIGURED OUT!!
System.Net.Mail.Attachment attach
attach = create System.Net.Mail.Attachment(filepathname,"application/pdf");
//Helper.Mail.AddAttachment(message, attach) //THIS USED TO WORK
message.Attachments.Add(attach); //MAYBE THIS WILL WORK

 

 

System.Net.Mail.SmtpClient smtpclient
smtpclient = create System.Net.Mail.SmtpClient
smtpclient.host = "webapp.abc.com"
smtpclient.port = 25
smtpclient.send(message)

 

mle_1.text = "Your receipt has been emailed to the requested recipient at " + user_id

 

else


mle_1.show()
mle_1.text = "Sorry, there was a problem generating the file."

 
destroy message
destroy smtpclient

 

end if

 

#end if

PowerBuilder 11.2 COM saveAs PDF issue (Windows 7 64bit)

$
0
0

Hi,

 

I have a COM component build by PowerBuilder 11.2. When I tried to save as PDF, its returning -1 and create 0 byte PDF. But the same code working fine on the classic application and generates PDF successfully. I have the "Sybase DataWindow PS" installed in my machine. Any one have any idea why it is not working when it is tried to SaveAs PDF from COM component? all folders have appropriate read/write permission as well.

 

System details below

 

PowerBuilder 11.2

Windows 7

GhostScript 8.71 64bit

 

Any help???

 

Thanks,
Senthil

Passing datastore (populated) to a new window via Message - null object ref?

$
0
0

Hi, Powerbuilder 11.5.1

 

 

I'm trying to pass contents (say, 100 rows) of one datastore from w_one to w_two by Message.PowerObjectParm. What I do in the first window is set

 

Message.PowerObjectParm = lds_datastore

 

and immediately call opening of the second window. In the preopen() of the second window, I try to retrieve this datastore and its contents by

 

n_ds ds_get_datastore

ds_get_datastore = Message.PowerObjectParm

 

However, when I call ds_get_datastore.RowCount(), I keep getting null object reference on it. I did a bit of research, and I would understand if the first window was a response window which was CLOSING right when the new window gets opened, as in that case the original datastore gets destroyed. But it's not a response window, and at the time of opening the second window, the first window and its datastore very much still exist, albeit they lose focus, obviously.

 

So if the first window is not destroyed, and its datastore as well, why am I getting a null object reference when I call a RowCount() on the picked up datastore in the new window?

 

If this just can't be done, can you suggest alternative ways? I tried to do it by GetFullState() and keeping it in blob, but it seems that I can't pass blob via Message PowerObjectParm somehow. Compiler returns "Incompatible types in assigment: powerobject, blob"?

 

 

Thanks for any suggestions

Powerbuilder application crashes after upgrade to 12.5.2 (build 5006)

$
0
0

I have already seen few similar posts on this forum for similar issue. However, I feel mine is different from those and could be some basic steps am missing. Thanks in advance for any comments.

 

 

We are evaluating the effort and benefits of migrating our PB 10.2.1 (build 9731) application to  PB 12.5 Classic. After downloading the trial version from the SAP site, I could migrate the application easily with only a handful of warnings. However, while running the application either from build (EXE) or from IDE, it crashes (windows application failure) frequently. In addition to that, few of our application screens opens as blank screen (doesn’t display anything in the DW attached).

 

My operating system is Windows 7 (32 bit) Service Pack 1. The application has many calls external DLLs (both windows standard and custom), as samples at the bottom. I believe that the correct (from PB 12.5) DLLs are copied to Powerbuilder home directory (C:\Software\Sybase\PowerBuilder 12.5 & C:\Software\Sybase\Shared\PowerBuilder) and the source code directory in my attempt to ensure that there are no issues with DLLs. However, initially I had installed powerbuilder 12.5 also under the same root as Power builder 10.0, but as I read few posts that DLLs from different version residing in same place can cause issues, uninstalled and installed PB 12.5 on different location.

 

Our PB application also interact with the .Net modules of the application by communicating through a custom DLL. However, that seems still working and I am able to open the .Net screens from the migrated application.

 

Below are the main scenarios in which the application crashes and every time I get a DLL error as given below.

1. While running the application from IDE and selecting ‘Exit’ from the main window. This will close any instantiated objects and close the mutex by calling the windows API.

 

function ulong CreateMutexA(ulong lpMutexAttributes, boolean bInitialOwner, ref string lpName) library "kernel32.dll" alias for "CreateMutexW" function ulong GetLastError() library "kernel32.dll" alias for "GetLastError;Ansi"

function ulong CloseHandle(ulong hMutex) library  "kernel32.dll" alias for "CloseHandle;Ansi"

 

This will result in the below crash.

 

Faulting application name: PB125.EXE, version: 12.5.2.5006, time stamp: 0x50f93412

Faulting module name: kernel32.dll, version: 6.1.7601.17932, time stamp: 0x503275b9

Exception code: 0xc0000005 Fault offset: 0x0004c372

Faulting process id: 0x2bdc

Faulting application start time: 0x01cf3e72371227c9

Faulting application path: C:\Software\Sybase\PowerBuilder 12.5\PB125.EXE

Faulting module path: C:\Windows\system32\kernel32.dll

Report Id: 8feef8fc-aa65-11e3-8049-f500274aecdc

 

2. Opening of certain windows results in the below crash. If I try to debug the code and move mouse over the line of code being executed, then also I get the same crash. I don’t do the mouse move then I can proceed with the same line, however it will crash at a later line calling ‘classname’.

 

Problem Event Name: APPCRASH

Application Name: PB125.EXE

Application Version: 12.5.2.5006

Application Timestamp: 50f93412

Fault Module Name: PBVM125.dll

Fault Module Version: 12.5.2.5006

Fault Module Timestamp: 50f93437

Exception Code: c0000005

Exception Offset: 00175357

OS Version: 6.1.7601.2.1.0.256.48

Locale ID: 3081

Additional Information 1: 38ca

Additional Information 2: 38ca6ad0537dbd0555785bd862b8e94f

Additional Information 3: 0cd5

Additional Information 4: 0cd54a5b6672f15bf2ca366539d89c12

 

3. Few of the application screen opens but doesn’t display the datawindow attached to it.

PB 11.5.1 application crash due to Win8 touchscreen

$
0
0

Hi, PB 11.5.1.4011 application - runs fine on absolutely all windows versions, but on Win8 with touchscreen, it produces a generic "xxxxx.exe has stopped working error" when tabbing or clicking into the field.

 

I found a confirmation of this on stackoverflow topic, where the problem was described as:

 

"We have serious issues with running a PB10 application on Windows 8 computers.

Application runs fine until user enters text in datawindow fields, the application "stopped working". The problem is that it happens randomly, 10 fields can be entered without a problem but at the next field the "stopped working" pops up en the application is closed the next time it might happen after entering 2 fields."

 

However, the original author also added a while later that this is only due to Win8 Touch Screens:

 

"We finally found the issue. The problem only occurs on computers with a touch screen. By disabling the Touch Keyboard service the PB program runs perfect"



Obviously, disabling Touch Keyboard service is the suggested solution, but I just wondered has anyone else found alternative solutions (apart from migrating to newer Powerbuilder)? Would running the application in "compatibility mode" with a previous version of Windows maybe do it?

 

 

Thanks

How to remove table fragmentation to improve performance?

$
0
0

Use DBArtisan to check ASE space and found there are 132 fragmentation under tabe analyst.  How to remove table fragmentation to improve performance?


How to collapse other expanded item

$
0
0

Hi,

 

I have 5 department on a tree view datawindow   and each department consists of employee name. When I try to expand department 5  how to make

other departments  as collapsed if they have been already  isexpanded before. The users want to view the current item to be expanded state.

 

Please help

Pol

Sort data at client side to improve performance?

$
0
0

Have a datawindow get data from a stored procedure. In the sp, there is a order by for the result.

If remove order by in sp, and add sort in data window on same field, does it improve the performance overall?

what's is the default powerbuilder 11.5 version/source code control?

$
0
0

Want to know what's is the defacut powerbuilder 11.5 source code control. How to enable it? Is it a plug-in and need to installed separately?

Save .PSR to SQL Server 2005 database

$
0
0

Hi all,

 

I want to store certain invoice printouts in .psr format, into an SQL Server 2005 database so that the users can retrieve the psr and have the reports displayed. I am using PB 11.5.

 

I can save it in an external file OK (using SaveAs - PSReport!).

 

I am puzzled for the following.

 

How to save it in the database.

 

Also it would be more than 32kb so FileRead will have issues to create a single file (?).

 

What is the best datatype to use for SQL Server?

 

How do I retrieve it to use it? (FileRead and then create external file with FileWrite?)

 

Has anyone done it before? Any recommendations, samples, guidelines are more than welcome!

 

Thanx in advance!

Budget Reviewing

$
0
0

Reviewing the budget executed February, I find values ​​that do not correspond to what is actually received by me on February 25, (among them I find a value in January that also corresponds to the received) are large amounts and I'm worried because it is by counting within budget ... thank you in advance for guidance ...

 

Regards

Rajesh

questions & answer type powerbuilder 12.5.2 classic tutorial

$
0
0

Dear All,

 

 

Can anybody give me any web link / tutorial / e-book regarding
powerbuilder 12.5.2 classic where the information represented as
questions & answer type
.

 

Thanks

Avishek

Powerbuilder 11. 2 stopped working. Please urgent

$
0
0

When I regenerate the object the following message is coming  the PowerBuilder stopped message coming. How to fix this problem . Please urgent..

 

I came to know somebody we can fix this by changing ini file  but I donot know

Please help to fix this issue

 

Regards

Pol


PowerBuilder "upgrader" or compiler services

$
0
0

Hi,

 

I'm looking for a way to upgrade a larger business application from PB 11.0 to the latest .Net version. The background is that we'd be able to support .Net a lot easier than the arcane ways of the PB IDE/binaries that it generates. Also we want unified exception handling and bugfixes.

 

Is there an automatic converter available somewhere - or even better a compiler service with a corresponding object model for .Net?

 

If I can get code in C# or F# (or even VB or PowerScript as I can decompile/convert that) -- I can make almost anything happen -- but in the clunky IDE + COM-manifests of PB 11.0 I'm lost.

 

Even if there is nothing of the above available, is there a clear and accurate description of the core language and runtime properties available somewhere?

How to get client-machines Regional Settings?

$
0
0

Hello

I have an app counting down time (days, hours, minutes and secs) to certain event.

My question is how to get it work globaly? Assume following example:

There is an event taking place in NYC 7.00 pm a particular date. From my location , server-site, the clock is 7 hrs ahead of

NYC-time. Adding 7 to NYC-time gives me 02,00 am NYC-date + 1. Now I can do countdown calcs to this modified datetime.

But it works only for sites located on my longitude. How can I get work globally, regardless of longitude?

Prompting the user on client-machine for local date and time is not a desirable option.

Best Regards

Outi

String Size Limit in Oracle SP

$
0
0

PB 12.5.1

 

Does anyone know if the 32K limit on passing a string to an Oracle SP is still there for the Oracle 12 client?  We are currently still using the Oracle 9 client and I didn't want to go through all the hoops to see (Lazy?).  I know the 11 Client still has the limit and I can't find any thing to tell me that is different in 12.

 

Thanks,

Chris Craft

Error when trying to run pb2java example

$
0
0

I'm fairly new to powerbuilder, but when trying to get a PBNI to java example program running to get an understanding of the PBNI -> C++ -> JNI interface, I'm getting an error that i can't figure out. It should be noted that the example programs for PBNI to Java haven't been updated in nearly a decade and were written for PB9. The error message I get happens at the line i_jvm.createjavaobject(conv, "Converter", "converter") and results in the error message "Error: Error calling method of PBNI object".

 

PBNI Error.PNG

 

Does anyone have any working code examples of how to interface PowerBuilder -> Java or vice-versa? Thanks for the help!

PB .NET WCF JSON

Viewing all 2935 articles
Browse latest View live


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