Solved

Need Uppercase Update functionality from PB

Posted on 2000-04-13
5
753 Views
Last Modified: 2008-02-20
I have a PowerBuilder application that I need to run against a Sybase ASE 12 database which is configured to be case sensitive and requires all SQL to be uppercase.  I converted all of the datawindow retrieve and embedded SQL to uppercase and it all works, but the datawindow updates did not work.  I exported the datawindows and changed all of the update DB names to uppercase but it still is working for the updates.
Does anyone have any ideas of anything that I could try??
0
Comment
Question by:cwilliams122399
5 Comments
 
LVL 2

Expert Comment

by:jkotek
Comment Utility
There are two points I would try:

1) try to re-select updatable table in update properties of datawindow object

2) check sqlsyntax argument in SQLPreview for what is send to ASE.
0
 
LVL 9

Expert Comment

by:david_levine
Comment Utility
Or run your app with /PBDEBUG and it will output a debug file with all the code and sql sent to the database.

You saud all SQL needs to be uppercase. You shouldn't have to worry about the case of the SQL syntax. You meant the column names? Or do you mean you want to keep the data in all upper case?

David
0
 
LVL 1

Expert Comment

by:runebj
Comment Utility
Quick and simple...

Follow jkotek's advice, but add this code (can be done in a DW control ancestor if you like) to the SQLPreview event:

SetSQLPreview( Upper( SQLSyntax ) )
Return 0

This makes all SQL uppercase before it is sent to the DB.

Good luck
Runebj
0
 

Expert Comment

by:shabbirab
Comment Utility
Any modifications in a PB DataWindow (even if it is changing the case of the source) requires to re-specify the Update on the DataWindow. Did you do this ? If yes, what is the message that you are getting when you run the PB Application ?

Shabbir
0
 

Accepted Solution

by:
russ_hensel earned 350 total points
Comment Utility
In the dw syntax there is a statement like  update="plant" ( in this case from a pbselect, or graphics mode ) it tells pb the name of the table to update.  That is what needs to be in upper case.
You can get at this without running thru the syntax of the dw ( not the sql )
by using the dw property


Datawindow.Table.UpdateTable      
as in

ls_table =  dw_1.Object.DataWindow.Table.UpdateTable      

which you might follow with

dw_1.Object.DataWindow.Table.UpdateTable      = Upper( ls_table )

if you want to do a fix at runtime. ( prehaps just after you setTransObject )

Opening the painter and reseting the update table ( against a db with the proper capitilization ) should also fix up the dw.

I would not capatalize all the syntax, if you are not using bind variables it could cause problems.

Russ
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now