Getting SQL statement from Datawindow

Hi!

Is there a way to get the exact SQL statement that will be generated when
calling dw.Update()?

dw.GetSQLSelect() returns the statment in this form ...
  SELECT xx, yy FROM ...

I am trying to get the statement in this form.

  UPDATE xx SET ....
  INSERT INTO XXX(xxx) VALUES(xx)....

Thanks,
Geoff


0
Geoffrey
7/16/2003 6:52:54 AM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

2 Replies
2368 Views

Similar Articles

[PageSpeed] 15

Have a look at sqlPreview event.

On Wed, 16 Jul 2003 15:52:54 +0900,
 in powersoft.public.powerbuilder.datawindow
Geoffrey Sy <gsy@alliance.com.ph> wrote: 
>Hi!
>
>Is there a way to get the exact SQL statement that will be generated when
>calling dw.Update()?
>
>dw.GetSQLSelect() returns the statment in this form ...
>  SELECT xx, yy FROM ...
>
>I am trying to get the statement in this form.
>
>  UPDATE xx SET ....
>  INSERT INTO XXX(xxx) VALUES(xx)....
>
>Thanks,
>Geoff
>
>
0
Olivier
7/16/2003 8:59:30 AM
Have you looked at the SQLPreview event?  This event occurs immediately before a
SQL statement is submitted to the DBMS.  

On Wed, 16 Jul 2003 15:52:54 +0900,
 in powersoft.public.powerbuilder.datawindow
Geoffrey Sy <gsy@alliance.com.ph> wrote: 
>Hi!
>
>Is there a way to get the exact SQL statement that will be generated when
>calling dw.Update()?
>
>dw.GetSQLSelect() returns the statment in this form ...
>  SELECT xx, yy FROM ...
>
>I am trying to get the statement in this form.
>
>  UPDATE xx SET ....
>  INSERT INTO XXX(xxx) VALUES(xx)....
>
>Thanks,
>Geoff
>
>

- - - 
Andy [TeamSybase]

Techwave 2003 - http://www.sybase.com/techwave2003
International Sybase User Group (ISUG) - http://www.isug.com
CodeXchange - http://powerbuilder.codeXchange.sybase.com/


0
Andy
7/16/2003 11:54:57 AM
Reply:

Similar Artilces:

DataWindow This, DataWindow That...
Blah blah blah You've heard it enough that you don't even want to comment on how many times... The DataWindow. ....but it can't be enough anymore...can it? This from one of our colleagues (and yes my apologies for taking it out of context)... "...PB covers all you need to do that in ONE Tool. This includes Windowprogramming ( meaning the interface to the user: Windows, Sheets, diallougeboxes, etc.), Database operability AND Reporting! Well, I see als well as many other PB users that some of the implementations and features PB offers are improvable. But thi...

Help! How to modify the sql select statement for a nested datawindow inside a composite datawindow?
Help! How to modify the sql select statement for a nested datawindow inside a composite datawindow? Would the following work? dw_nest.Object.DataWindow.Table.Select="select employee_id from ..." Please help. jungan@aboex.com GetChild () ??? "Jun Gan" <jungan@aboex.com> wrote in message news:40e48313$1@forums-2-dub... > Help! > > How to modify the sql select statement for a nested datawindow inside a > composite datawindow? > > Would the following work? > > dw_nest.Object.DataWindow.Table.Select="select e...

Getting datawindow Properties from within datawindow??
PB7.0.3 hi, i would like to create a custom userObject uo_myDW that inherits from DataWindow and stuff some default behaviour into it. For a new app i'm writing, i need a pile of input windows, all sharing the same functionality. I'd like to build uo_myDW so that in incorporates all standard 'inputDW-behaviour'. Here 's what i want to do For one of these functionalities mentioned above, i need the collection of uo_myDW's columns that are 'Tab-able' (have a tabindex > 0), and store them in a instance var ids_DWColumns for future reference. ...

Top Statement and INDEX= Statement in Datawindow SQL Painter
Hi, Is there any way to put TOP and INDEX statement into Sql definition in Datawindow painter in graphical view. I know that I can go to "Convert to Sytax" but I want to learn if there is an option like "DISTINCT" in painter. SQL Example: Select TOP 100 Name,Surname FROM Names (INDEX = INX_name) Thanks for all Ali 'Top 100' you can do by making the first item in the select list a computed column TOP 100 Name I can't think of a way of doing Index. I never use graphical mode for anything other than very simple queries (and usually no...

SQL statement in datawindow
In my Datawindow painter, I would like to use "LIKE" in the where clause of my SQL SELECT STATEMENT, but it doesn't seem to show the correct results. I want to show the results from the database where the input (a retireval argument) matches anything that's entered close to that entry. I tried something like this: ie. SELECT name, address, city, province, postal_code WHERE name like '%(:name)%'; How can I use LIKE in the WHERE clause where string I am trying to match is an input retrieval argument? where name like '%' + :name + '%&#...

Get SQL From datawindow
How Get Perfect SQL statement from datawindow? I don't need "PBSELECT( VERSION(700) TABLE(NAME=~"Table~" ) COLUMN(NAME=~"col1~")" I need "SELECT col1, col2 From table Where col1 = arg;" I need your help, please! Try: dw_1.Describe( "table.SQLSelect" ) -- pbm_hopethishelps, Roy Kiesler [TeamSybase] Sybase Developer Network (SDN) - http://www.sybase.com/sdn "minkyu kim" <kim0329@netian.com> wrote in message news:pVhALaIj$GA.285@forums.sybase.com... > How Get Perfect SQL statement fro...

How Get sql in datawindow
I need get the command sql that go to DataBase when I do update at the datawindows. The SQLPreview event in the DW is your friend here. Use sqltype = PreviewUpdate! to get the SQL only for updates. Argenis Castro <argeniscastro@hotmail.com> wrote in message news:obGzKcxTAHA.269@forums.sybase.com... > I need get the command sql that go to DataBase when I do update at the > datawindows. > > ...

How to share the datawindow to inner datawindow of nested datawindow
How to share the datawindow to inner datawindow of nested datawindow. Ex -------- dw_1 is normal datawindow dw_nes is nested datawindow, both are placed one window dw_nes contain dw_child datawindow Question ---------------- i want to share dw_1 and dw_child. I have tried the below code, getting error dw_1.sharedata( dw_nes.object.dw_child) It's the dot notation. You will need to dw_nes.GetChild("dw_child", ldwc) where ldwc is a _local_ datawindowchild. <kzganesan@gmail.com> wrote in message news:4c64c402-bac5-4ee0-83aa-4ac08ffe43e5@r66g2000hsg.go...

Getting Datawindow name from datawindow child variable
Hi ! I want to get the datawindow (name) from a datawindowchild variable. But, the dwc has no way to get it. I want the code like this : datawindowchild dwc dw_1.getchild("colname", dwc) dw_2.dataobject = dwc.dataobject -------------- -> X In the above code, "dw_1.object.colname.dddw.name" is what I want. But, from the "dwc", I can't know that. Please, help! thx. You're correct. There is no way to get the datawindow name from the datawindow child, you have to ask the paren...

Export datawindow select statement form all datawindows
I have a large application with a lot of DWs. DB is SQL Server 2000. Some DW use " (double quotes) in the select statement (not '), and now, with PB105 and oledb, this statements fails (MS native driver works) I know that " isn't a valid character for delimiting strings in SQL, but this large application was written by many people :) How can I find all " in all select statements in all DW within my application to do a replace. Thanks, Alex B. Hi Alex, I'm not sure wether some tool like PBL Peeper is capable...

changing datawindow connection is breaking my datawindow SQL
Hi I have had to move a number of datawindows from Oracle 9i running on a windows 2003 to Oracle 9i on AIX 4.3.3 (which is also on a private network, and requires a VPN to connect to). In the datawindow designer, I have also had to change the database interface from O90 Oracle 9i to an ODBC datasource (because I was not able to connect). In doing so, I have had to graphically re-create all the DW SQL again because I get this error: Table "XYZ" has no columns, possible invalid table format. Do you want to continue in graphic mode? If I select "NO", the SQL is...

datawindow
Add direct setting and getting capability for the datawindow where clause. This would have to be a string array in case of unions. Return ONLY the where clause(s) in the main select (in case of sub-selects, ignore the where clause or somehow list it as a subselect in the where or a subselect in the select). It would be great if I could just get and set this as a value and have the datawindow automatically change (or add) the where clause as specified. This is for setting the where clause dynamically at run time. Currently have to parse through the datawindow.table.select looking f...

Any way to get the parent of a child datawindow in a composite datawindow?
Using PB 8.0.3 9704 on Win2K. I have a DataWindowChild that came from a GetChild() call for a composite datawindow. At runtime, I don't "know" what composite datawindow is the parent of the child datawindow. Any ideas on how to get this information? I tried DataWindowChild.GetParent(). Compiles fine and "Help" says this should work, but all I get is a null object reference. Thanks in advance... Is this a problem with a poorly designed function signature? Succesfull GetChild call could ONLY have been done with having a reference to the datawindow...

how to get the number of rows of a datawindow nested in another datawindow?
Hi All! Has anyone an idea how to get the number of rows of a datawindow nested in another datawindow? I have a datastore l_ds = CREATE datastore l_ds.dataobject = "d_invoice" l_ds.SetTransObject(SQLCA) li_rows = l_ds.Retrieve(... and so on I am able to access a value in the nested datawindow like this: l_ds.Object.d_items[1].Object.item_description[1] l_ds.Object.d_items[1].Object.item_description[2] l_ds.Object.d_items[1].Object.item_description[3] (d_items is the nested datawindow) But I do not know how to retrieve the number of rows of the nested...

Web resources about - Getting SQL statement from Datawindow - sybase.powerbuilder.datawindow

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 2/10/2016 6:27:03 PM