datawindow vs. embedded sql

Hi,

I would like to update a table, but have found using
datawindows to be very slow especially when performing a lot
of dw_1.SetItem statements.  Instead, I'm using embedded sql
insert statements for each row.  Could someone please
explain the disadvantages of using embedded sql?

Thanks,
Inya
0
Inya
8/29/2006 7:48:54 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

3 Replies
1081 Views

Similar Articles

[PageSpeed] 59

Embedded SQL is useful for several things.

What are you planning on doing with it?

If you put it in a loop and send one insert/update...
at a time to the server than wait for the reply and
then send the next one...  Too slow...  Also you will
have to do something with the transaction.

SetItem in itself is not slow.  The painting of the
screen slows it down.  Turn SetRedraw to false then
populate the dw then SetRedraw to true.  That will
speed things up.  Or use a DataStore that doesn't have
the painting feature.

You can update/insert rows then send them in one
set to the server, it will process the rows then
send a success or failure back.

> Hi,
>
> I would like to update a table, but have found using
> datawindows to be very slow especially when performing a
> lot of dw_1.SetItem statements.  Instead, I'm using
> embedded sql insert statements for each row.  Could
> someone please explain the disadvantages of using embedded
> sql?
>
> Thanks,
> Inya
0
Dawn
8/29/2006 8:36:36 PM
Another datawindow feature:  If you're using the autoincrement feature of 
your database to assign numeric sequence keys, then retrieving that value 
into your application is MUCH simpler with a datawindow than with embedded 
SQL.

You just do a getItemNumber() on the key row/column, instead of having to 
execute a second SQL statement such as "Select @@identity from dummy;"

Paul Horan[TeamSybase]

<Inya> wrote in message news:44f4978d.3375.1681692777@sybase.com...
> Hi,
>
> I would like to update a table, but have found using
> datawindows to be very slow especially when performing a lot
> of dw_1.SetItem statements.  Instead, I'm using embedded sql
> insert statements for each row.  Could someone please
> explain the disadvantages of using embedded sql?
>
> Thanks,
> Inya 


0
Paul
8/29/2006 9:34:03 PM
It depends as to which is better.  The "Sybase Powerbuilder" stock reply is 
to always use Datawindow or Datastore.  My opinion is that it depends on how 
much control you want to have on the process.
I have seen people spend really large amounts of effort to "force" the 
datawindow/datastore to do something that could be done with only a few very 
simple SQL statements.  Also I recommend that you attempt to use stored 
procedures often to increase performance and logic separation.  It may be 
worth looking a sql profile trace to see what exactly is being sent to the 
database and the relative time the db engine is spending on each.



"Paul Horan[TeamSybase]" <phoran AT sybase DOT com> wrote in message 
news:44f4b033@forums-2-dub...
> Another datawindow feature:  If you're using the autoincrement feature of 
> your database to assign numeric sequence keys, then retrieving that value 
> into your application is MUCH simpler with a datawindow than with embedded 
> SQL.
>
> You just do a getItemNumber() on the key row/column, instead of having to 
> execute a second SQL statement such as "Select @@identity from dummy;"
>
> Paul Horan[TeamSybase]
>
> <Inya> wrote in message news:44f4978d.3375.1681692777@sybase.com...
>> Hi,
>>
>> I would like to update a table, but have found using
>> datawindows to be very slow especially when performing a lot
>> of dw_1.SetItem statements.  Instead, I'm using embedded sql
>> insert statements for each row.  Could someone please
>> explain the disadvantages of using embedded sql?
>>
>> Thanks,
>> Inya
>
> 


0
Tyler
8/31/2006 2:05:20 PM
Reply:

Similar Artilces:

Datawindow vs Embedded SQL
This is a multi-part message in MIME format. ------=_NextPart_000_0006_01C7A377.D3C2C060 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Can anyone point me to some good documentation (or provide the answers = here) as to the pro's and con's of using a DataWindow or Embedded SQL? = Which is better, which is more efficient, what way does Sybase = recommend? Any documentation that can help me answer these questions = would be helpful, also any insights any of you might have would be = great. Thank you! --=20 Dave H...

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 this seems not to be the main issue here to be discussed. Fact is, and I've looked around to may other Programming systems, there is NO OTHER tool (I did not find any) which is comparable RAD..." So here's the two-fold feedback I'm hoping for and thanks in advance for your investment of time/effort to respond... *** 1) What true competitive differentiators does PowerBuilder still have as 2007 draws to a close? *** Yes, we can add/improve features but... *** 2) What can we add to, or change about PowerBuilder that would be a true competitive differentiator? *** Arguably one way to distill this down would be to ask what can be done for PowerBuilder that would make it better than (Visual Studio + DataWindow .NET)? Maybe its a single feature. Maybe its a new category of functionality. Maybe its a "eureka" modification to something PowerBu...

Embedded SQL Vs DataWindow Update...
Hi : I have often heard a debate on the processing speeds of embedded SQLs. I have heard an argument stating that "Embedded SQL takes more time to execute than the update of a DataWindow that is defined with a SQL similar to the embedded SQL". Does anyone have any clue about the authenticity of the above argument? Which of these is a better approach? Thanks in advance. Biju Nair I have no way of confirming this and can only offer reasoning as the justification for my opinion. I think Embedded SQL should be faster than similar SQL generated by a DW. The SQL...

Embedded SQL vs datawindow object in PB7
I'm trying to run a Select statement against an Informix database with PowerBuilder 7 and using the Intersolv Informix 9 driver. I've created a dw object that I can retrieve 3 rows from the Informix database. I've created the same SQL statement and embedded it in a window function. When I run the window, the statement seems to run ok, but I get no rows from it. I've connected to the database, set the trans object and retrieved all in consecutive lines, but it still doesn't return anything. I've even tried creating a test window that has a dw control on it...

embedding a datawindow within a datawindow
Below is a sample of the format for a report I need to create. The report will display courses that may or may not be part of group, because the people running the courses can choose from all the courses available to create their own "group" of courses. Since a course may or may not be part of a group would using an embedded datawindow for the group info work? How? Can anyone point me in the right direction? The data is coming from two tables. Thanks, Kevin CourseID CourseTitle CourseTopic EnrollMax EnrollCurrent 100145A "Sample" "Sample"...

Html-datawindow vs web-datawindow
Hi! We have mede some pages using datawindowbuilder. There we used html-datawindows. Now we have upgraded to PB8 and here it is called web-datawindow. What is the differense? 40% of the pages arnt working after we migrated to PB8. It seems like there have been some changes? Regards Staale What errors are you seeing with the problem pages? A. Staale wrote: > Hi! > > We have mede some pages using datawindowbuilder. > There we used html-datawindows. > Now we have upgraded to PB8 and here it is called web-datawindow. > What is the differense? >...

SQL vs Datawindow
Hi All, I was wondering if there were reasons for utilizing SQL and not a Datawindow or a Datastore when performing an update or insert? Is there a preferable way. Which is better? Thanks The preferable way is whatever works, Sorry had to say it ;-). This is a subject where you are going to get a lot of different opinions. In my opinion I like to use a datawindow or datastore for any updates or inserts where there is more then one record affected. For the times when there is only one record affected I create a function on a userobject and do it from there. One of the thing...

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...

HTML Datawindow DTC vs. Datawindow DTC
Can anyone tell me if the HTML Datawindow DTC provides an 'easy' way to make columns sortable like you can in the Datawindow DTC? Thanks, NP To do this you can code the following: <SCRIPT> htmlDW.SetSort('#1 A'); htmlDW.Sort(); </SCRIPT> This code could be tied to a drop down list box or a set of radio buttons that contains the column names to be sorted. Regards, Dan van Leeuwen On Wed, 12 May 1999 16:48:40 -0500, "Noah Pruzek" <npruzek@hotmail.com> wrote: >Can anyone tell me if the HTML Datawindow DTC provides an...

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...

Embedded DataWindow within the new HTML DataWindow
Hi All, Does the new HTML datawindow support embedded HTML datawindows? Thanks. Andy Egleston In a word, no. Here's an extract from an upcoming article I wrote for PBDJ on the HTMLDW and the presentation styles it supports: Presentation Style Report (non-updateable) Form (updateable) ================== ======================= ================= Composite No (HTMLDW not supported) No (HTMLDW not supported) Cross-tab Yes No (cannot set tab order) Freeform Yes Yes Graph ...

DataWindow Within DataWindow
How Can I access/modify object/control from a Datawindow within Datawindow. When i access/modify object/control from a Datawindow i used dw_1.modify("name.text = 'new val'") but within another datawindow or child datawindow it doesnt work. Your description is difficult to understand due to the terminology. First, a datawindow is assigned to a control - either a datawindow control or a datastore. Second, the Modify function can only be called within a script. With that as a basis, can you rephrase the question and describe more precisely what you want to do? ...

datawindows in composite datawindow used in datawindow.NET, are not sliding up
Hi, Problem: datawindows in composite datawindow used in "datawindow.NET", are not sliding up , if one dw is not visible or did not retrieve data. Resulting in unwanted spaces. The height of blank white space is equal to the height of the datawindow art design time. When I looked at the generated JavaScript, I noticed there is "div" for the datawindow with height 0.00in which is supposed to be not visible. Tried different options with html/xhtml/xml same result. But slides up ok when exported to pdf(using saveas) on web and in PB10.5 application. Also s...

modifiyin a datawindow in a datawindow
Hi, When I want to modify a datawindow, then it's just dw1.modify() But what do I have to do when I want to modify a datawindow in a datwindow ? I tried : dw1.dw2.modify() but that doesn't work. Anyone can help me out with this ? thanks. Regards, David get the dw via getchild & apply modify In article <4575976f.4dda.1681692777@sybase.com>, David says... > Hi, > When I want to modify a datawindow, then it's just > dw1.modify() > > But what do I have to do when I want to modify a datawindow > in a datwindow ? > I tried : dw...

Datawindows with child datawindows
I want to create a datawindow whose only data is three columns that will themselves be drop-down data windows. These child datawindows will be populated in PB script with dw_1.GetChild(). When I create that parent datawindow (New | Datawindow | Freeform), what do I choose in the next dialog box ("Which datasource would you like to use?") External? Thanks. That depends on how you want to populate and use the columns of the main DW. The DDDW is an edit style that assists the user in selecting a value for the column in the main DW. If you want to retrieve the values ...

PB9: DataWindow.Printer vs. DataWindow.Print.PrinterName
In PB8, dw_cntl.object.DataWindow.Printer allowed you to direct Print functions for the DW to a specific printer. In PB9, dw_cntl.object.DataWindow.Print.PrinterName is supposed to provide that capability, but dw_cntl.object.DataWindow.Printer still exists. What is the difference? When should each property be used? TIA, Chet The only thing I can see is that possible the DataWindow.Printer is still here for backwards compatibility.... It seems that the .printer only affects setting the printer for that datawindow and does not change it for the PB or System default printe...

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...

DataWindows and datawindow objects
Difference between Datawindow and datawindowobjects? - datawindow is a control on a userobject or a window - datawindowobject (DWObject) is a control within a datawindow, defined in the dataobject of the datawindow. You refer to it as <datawindow-instance>.Object.<datawindow object> HTH, Ben (bede) <Santhoshi> wrote in message news:3f8bee8b.4631.846930886@sybase.com... > Difference between Datawindow and datawindowobjects? Not exactly; DW Control is a "container" that reserves real-estate on the surface of a visual object. DW Obj...

SQL synatax vs Datawindow Retrieve
I recently discovered the following: I have an SQL statement with aggregate functions (mainly sum())along with group by clause. When this SQL is incorporated in the Datawindow, the retrieval is pretty fast. When I submit the same SQL statement using ISQL or SQL Advantage, it takes a pretty long time and finally reports that the space in tempdb is critically low (tempdb of 2MB,data and log). Why the difference? I would like to know how the SQL statements are processed in both the cases. In my experience identical SQL will perform in identical fashion regardless where the ...

Datawindow Sum() function in PB 11 WebForms vs. Datawindow.net
Jim, et. al.: For ASP.NET 2.0 WebForms deployed with PB 11.1, do we still have the limitation included in the PB 11 help documentation that datawindow aggregate functions like sum() will not work in the WebForms? Or does it work when the page is reloaded like your discussion below about Datawindow.net? How do you suggest we rewrite all our legacy Win32 Datawindows that contain aggregate functions like sum() to work as WebForms? TIA, Russ On May 17 2005, 8:03 am, "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com> wrote: > Not a bug... see chapter 6...

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...

datawindow.net support embedded sql syntax ?
Hi all In PowerBuilder i can write code liek select emp_name into :ls_name from employee where emp_no = :ls_emp_no; In Datawindow.NET, i want execute sql immediately, how i can do it? Sam 2004-11-17 Use the AdoTransaction object for your DataWindows and the corresponding .NET IDbConnection to execute any other SQL (as you would for any .NET application). On 17 Nov 2004 01:01:35 -0800, "Sam.Kee" <joinkee@hotmail.com> wrote: >Hi all > >In PowerBuilder i can write code liek > >select emp_name into :ls_name from employee where emp_no ...

NT vs w95 problem with datawindow SQL
Hello, I have been developing an application that should run on NT and W95. I have the following SQL that works on w95 but not on NT. When I tried to modify the SQL on the NT machine it gives me an error that the SQL is invalid because of the case statement. This statement works on W95. SELECT DISTINCT dbo.resident.gender_code, case gender_code when 'F' then 'Female' when 'M' then 'Male' else 'Undefined' end as cmp_name FROM dbo.resident It's a SQL for a treeview that looks like: Female name1 name2 Male name...

Help: From MS SQL Server 6.5 Datawindow to Oracle 7.3 Datawindow
I have an application in PB 6.0 where the Datawindows are built using a connection to MS SQL Server 6.5; table and column name are composed using Upper-Case and Lower-case character (like IdOrder, IdClient, etc). Datawindows are kept in graphical mode. Now, I want use the same application for allow to other developer to work on Oracle 7.3, but the Datawindows built under MS SQL Server 6.5 connection don't work with a Oracle 7.3 connection; when I open a Datawindow and I select Design->Data Source, I get a box with the message: "Could not reconstruct the statement graph...

Web resources about - datawindow vs. embedded sql - 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/18/2016 5:26:52 PM