Dynamic SQL in a PowerBuilder 10.0 program

I have a PowerBuilder 10.0 program that has the following
embedded SQL update statement in it:

UPDATE timsheet SET status = 'S'  WHERE timsheet.timkpr =
:g_timkpr   AND timsheet.tmdate >= :Start_dte AND
timsheet.tmdate <= :End_dte   AND  timsheet.clid +
timsheet.clsb + timsheet.mtid + timsheet.mtsb  <>
:g_holdmatter AND         timsheet.status = ' ' ;

I need to change this so that the UPDATE statement can be
built at runtime based upon some information entered on a
window by the user.  Specifically the WHERE clause will
involve different fields and different values.

I have been unable to find anything to help me in the
PowerBuilder documentation.

The PB 10.0 program is accessing a MS SQL 2005 database.

Could somebody advise me as to how to do this?

Thanks,
Bruce Quillin
0
Bruce
1/4/2007 10:47:39 PM
sybase.powerscript 7704 articles. 0 followers. Follow

2 Replies
757 Views

Similar Articles

[PageSpeed] 11

FORMAT1 or FORMAT2 are the candidates with the later a better option.


Bruce Quillin wrote:
> I have a PowerBuilder 10.0 program that has the following
> embedded SQL update statement in it:
> 
> UPDATE timsheet SET status = 'S'  WHERE timsheet.timkpr =
> :g_timkpr   AND timsheet.tmdate >= :Start_dte AND
> timsheet.tmdate <= :End_dte   AND  timsheet.clid +
> timsheet.clsb + timsheet.mtid + timsheet.mtsb  <>
> :g_holdmatter AND         timsheet.status = ' ' ;
> 
> I need to change this so that the UPDATE statement can be
> built at runtime based upon some information entered on a
> window by the user.  Specifically the WHERE clause will
> involve different fields and different values.
> 
> I have been unable to find anything to help me in the
> PowerBuilder documentation.
> 
> The PB 10.0 program is accessing a MS SQL 2005 database.
> 
> Could somebody advise me as to how to do this?
> 
> Thanks,
> Bruce Quillin

-- 

Chris Keating
Sybase Adaptive Server Anywhere Professional Version 8

*****************************************************************************

Sign up today for your copy of the SQL Anywhere Studio 9 Developer 
Edition =and try out the market-leading database for mobile, embedded 
and small to medium sized business environments for free!

http://www.ianywhere.com/promos/deved/index.html

*****************************************************************************

iAnywhere Solutions  http://www.iAnywhere.com

** Please only post to the newsgroup

** Whitepapers can be found at http://www.iAnywhere.com/developer
** EBFs can be found at http://downloads.sybase.com/swx/sdmain.stm
** Use Case Express to report bugs http://case-express.sybase.com

*****************************************************************************
0
Chris
1/5/2007 12:32:07 AM
Bruce;

    This is really easy in PB ... 1st of all loose the embedded SQL and 
replace this with a DataWindow. On the DW Control or DataStore that houses 
the DW object, you can code script on the SQLPreview event to alter the 
Where statement dynamically (you have 100% control)!

HTH

Regards ... Chris

<Bruce Quillin> wrote in message news:459d921b.5775.1681692777@sybase.com...
>I have a PowerBuilder 10.0 program that has the following
> embedded SQL update statement in it:
>
> UPDATE timsheet SET status = 'S'  WHERE timsheet.timkpr =
> :g_timkpr   AND timsheet.tmdate >= :Start_dte AND
> timsheet.tmdate <= :End_dte   AND  timsheet.clid +
> timsheet.clsb + timsheet.mtid + timsheet.mtsb  <>
> :g_holdmatter AND         timsheet.status = ' ' ;
>
> I need to change this so that the UPDATE statement can be
> built at runtime based upon some information entered on a
> window by the user.  Specifically the WHERE clause will
> involve different fields and different values.
>
> I have been unable to find anything to help me in the
> PowerBuilder documentation.
>
> The PB 10.0 program is accessing a MS SQL 2005 database.
>
> Could somebody advise me as to how to do this?
>
> Thanks,
> Bruce Quillin 


0
Chris
1/5/2007 3:53:48 AM
Reply:

Similar Artilces:

Announcing the PowerBuilder 10 Public Beta Program!Join the PowerBuilder 10.0 Beta Team!
Join the PowerBuilder 10.0 Beta Team! PowerBuilder is getting ready for the 10.0 release and would like to invite you to join the Beta Team! The exciting new developments you will have early access to as a member of the Beta Team include: Unicode support DataWindow.NET Object Oriented Modeling with PowerDesigner plug-in UDDI search ADO.NET support NETXML Web Datawindow Your participation in the beta test cycle is an opportunity to provide valuable feedback to engineering regarding the quality and capabilities of this release. As a member of the team, you will learn from the experts how to take advantage of PowerBuilder's newest capabilities through regularly scheduled conference calls and web seminars (open only to registered participants). And participate in a community of other beta testers like yourself in an exclusive newsgroup reserved only for beta participants. PowerBuilder 10.0 is the next major release of Sybase's RAD development tool that revolutionized how you build applications. This is the best release yet! Register for the beta at www.sybase.com/pbtenbeta Regards, Sue Dunnell PowerBuilder Product Manager, Sybase, Inc. www.sybase.com Is there a new "private" forum for pb10 to discuss functionality/bugs in it just like for PPB? thanks "Dave Fish [Team Sybase]" <dfish@_no_spam_sybase.com> wrote in message news:400d7ef3.88237939@forums.sybase.com... > Join the PowerBuilder 10.0...

PowerBuilder 9.0 and PowerBuilder 10.0
Hello NG ,,, I have a strange problem , installed both versions of PowerBuilder on the same machine having Windows XP. under Program files\Sybase9 - > PB9.0 was installed . under Program files\Sybase10- > PB10.0 was installed, I was working on XML workspace in PB9.0 where in the library list PBDOM90.PBD was included. By mistake , I opened the same workspace in PB10.0 and the application was migrated completed. Later coming back to PB9.0 and opening the same workspace , found that , in the system tree PDB files has zero object, It is not showing anything and the appl...

Using quotes in Powerbuilder embedded SQL and SQL Anywhere 10.0
Hi, I was testing my app with the new release of SQL Anywhere 10.0. It looks like SQL Anywhere 10 does no longer accept any embedded SQL command that uses double quotes ie: SELECT "roster"."last", "roster"."first" into :ls_last, :ls_first ; // Generates syntax error in SQL Anywhere 10, but works fine in SQLA 9 SELECT roster.last, roster.first into :ls_last, :ls_first ; // Generates syntax error in SQL Anywhere 9, but works fine in SQLA 10 Changing all the embedded SQL in a big app requires lot of work and also the applicatio...

Using quotes in Powerbuilder embedded SQL and SQL Anywhere 10.0 ?
Hi, I was testing my app with the new release of SQL Anywhere 10.0. It looks like SQL Anywhere 10 does no longer accept any embedded SQL command that uses double quotes ie: SELECT "roster"."last", "roster"."first" from "database" into :ls_last, :ls_first ; // Generates syntax error in SQL Anywhere 10, but works fine in SQLA 9 SELECT roster.last, roster.first from database into :ls_last, :ls_first ; // Generates syntax error in SQL Anywhere 9, but works fine in SQLA 10 Changing all the embedded SQL in a big app requi...

update powerbuilder 10.0 to powerbuilder 10.5
hi, I need update powerbuilder ver 10.0 to powerbuilder 10.5. by the way, my company already buy pb ver 10.00 and need to update to ver 10.5. the question : if update pb from ver 10.00 to ver 10.5, is it free of charge ? if no, How I found the price ? best regards, alim 10.5 is considered a major release, you would need to purchase an upgrade. This is what I found on Sybase's own eshop: http://eshop.sybase.com/eshop/buy_detail?id=92023&prodId=9281&bid=17856 You may find better through an online merchant, partner or local retailer. This is also the Enterprise version, you didn't indicate which flavor you were using. BTW, if you obtain a USP (shown in the dropdown under support) you will then receive all major and minor releases of the product for free for the next year. On 12 Sep 2006 22:04:19 -0700, "alim" <alfen_lim@yahoo.com> wrote: >hi, >I need update powerbuilder ver 10.0 to powerbuilder 10.5. by the way, >my company already buy pb ver 10.00 and need to update to ver 10.5. >the question : >if update pb from ver 10.00 to ver 10.5, is it free of charge ? if no, >How I found the price ? > >best regards, > >alim And of course if you get a Sybase Technical Support Contract - it includes the USP. :) Tim. "Bruce Armstrong [TeamSybase]" <NOCANSPAMbruce.armstrong@teamsybase.com> wrote in message news:upufg29t7u9hfopv43d5ms9se52d2jlau5@4ax.c...

ODBC error "Program type out of range" , SQL State S1003 : PB6.0--->MS SQL Server7.0 on WIN NT4.0
Hi, I have installed SQL Server 7.0 Standard Ed. on Windows NT 4.0 with Service Pack 4. Then I installed Power Builder 6.0 Enterprise Ed. on the same server machine NT 4.0 + SQL Server 7.0 After defining an ODBC DSN and Profile in PB 6.0, when i try to connect from within Profile setup, it connects to the SQL Server 7.0 Database. But when i click on the Tables or Database icons on the toolbar to open the DB or tables, I get an error message like SQLSTATE =S1003 [MICROSOFT] [ODBC DRIVER MANAGER] Program Type Out of Range The same type of profile & ODBC settings on the Win95 and Win98 clients doesn't give any problems.. Can somebody suggest a solution.. Thanx T. Sivakumar HCL Infosystems Ltd., Coimbatore tshiv@hotmail.com or hclpso@vsnl.com Please review postings within the last day or two, I've put the URL there for a fix. Jim O'Neil Sybase Technical Support hclpso wrote: > Hi, > > I have installed SQL Server 7.0 Standard Ed. on Windows NT 4.0 with Service > Pack 4. > > Then I installed Power Builder 6.0 Enterprise Ed. on the same server machine > NT 4.0 + SQL Server 7.0 > > After defining an ODBC DSN and Profile in PB 6.0, when i try to connect from > within Profile setup, it connects to the SQL Server 7.0 Database. But when i > click on the Tables or Database icons on the toolbar to open the DB or > tables, I get an error message like > > SQLSTAT...

Is PowerBuilder 10.0 support Informix 9.4 or Informix 10.0 version
1. nirav_nc@yahoo.com Jan 24, 12:58 pm show options Newsgroups: sybase.public.powerbuilder.general From: "nirav...@yahoo.com" <nirav...@yahoo.com> - Find messages by this author Date: 24 Jan 2006 09:58:13 -0800 Local: Tues, Jan 24 2006 12:58 pm Subject: Is PowerBuilder 10.0 support Informix 9.4 or Informix 10.0 version Reply | Reply to Author | Forward | Print | Individual Message | Show original | Remove | Report Abuse I read PowerBuilder 10.0 release note. It says that "PowerBuilder 10 supports the following versions of Informix: 9.0, 9.1, 9.2, and ...

Migrating MySQL 5.0 to SQL ANywhere 10.0.1 in SuSE 10.2
hi guys, I am trying to migrate my MySQL database to SQL ANywhere using sa_migrate procedures. I use unixODBC as the connector. I succesfully connect to MySQL and SQL Anywhere. I also already create remote server, external login from the target database, and it works. But, when i'm tryin to migrate the database, the tables of MySQL database appeared, but it has no name, and i only can add one table to target database. and when i click finish, it results the error message : remote table sa..._et could not be found --> sa is my remote server name, and i dont know wha...

10.0.0 to 10.0.1 Solutions?
I have 10.0.0 installed and set up and am running into problems that are fixed in 10.0.1. The update to 10.0.1 is broken from what I can tell. Is there a manual fix or work around? Reinstalling is not an option at this point -- azizmandar ------------------------------------------------------------------------ At this point, there is not a solution. Novell is working at trying to get this matter resolved. Hopefully there will be a better answer shortly. -- Craig Wilson - MCNE, MCSE, CCNA Novell Support Forums Volunteer Sysop Novell does not officially monitor t...

Powerbuilder 5.0/7.0 and MS SQL 7.0 Performance issues
We recently converted our app from Powerbuilder 5.0 to PB 7.0 -- the app in PB 7.0 definitely runs slower on the client PC's than it did in PB 5.0. Now we are migrating the database from MS SQL 6.5 to 7.0 SP2. We successfully converted the databases in a testing environment, but now the app runs terribly slow! I don't think it's a hardware issue -- the test box is a Compaq 8500 quad Xeon 500 w/1GB Ram. We experimented running the app as a PB 5.0 app against MS SQL 7.0 and the problem is the same. When we execute SQL directly against the DB outside of PB, we see no perf...

Autoincrement Number Display
Am converting from SQL Anwhere ver 8.03 to SQL Anwhere ver 10. Powerbuilder ver 9.0 datawindows with autoincrement column will no longer display the newly assigned autoincremented number when the datawindow is saved. Is there a fix for this? Yes - the fix is in the PBODB090.INI file. It's been posted in this group a number of times... Find this section in your file: [Adaptive Server Anywhere] PBSyntax='WATCOM50_SYNTAX' PBDateTime='STANDARD_DATETIME' PBFunctions='ASA_FUNCTIONS' PBDefaultValues='autoincrement,current date,current publisher,cur...

PB 10.5 + SQL 10.0
I've just upgraded from SQL 8 to SQL 10 I've got problems with all Select that uses Quotes ("tbl_name"."Field_Name") Is there a switch that I can activate to enable quotes... I don't want to remove them all... big job thanks! Put DelimitIdentifiers=ON in the ConnectString of your transaction object. Paul Horan[TeamSybase] "Stephen" <smarcoux@cbgi.qc.ca> wrote in message news:45db5b1e@forums-1-dub... > I've just upgraded from SQL 8 to SQL 10 > I've got problems with all Select that uses Quotes > ("...

Upgrades Available for PowerBuilder 10.0.0
I've been using PowerBuilder 10.0.0 for about a year, and would like to upgrade. I noticed that there is an upgrade to 10.5.1 available online, but the documentation indicates you must have 10.5.0 installed first. Is 10.5.0 available for download, hopefully as an upgrade to an installed 10.0.0 configuration? Thanks in advance. Jim Silverman Inner Ring Software Ann Arbor, MI Oops - sorry about that. I thought I was in the PowerBuilder forum. Never mind... JAS > I've been using PowerBuilder 10.0.0 for about a year, and > would like to upgrade. I notic...

10.0.3 agent updating to 10.0.1 instead of 10.0.3.2
MY ZCM10 server is windows 2003 SP2 R2 updated to zcm 10.0.3.2 When I deploy the ZCM agent to a workstation the workstation installs the 10.0.3 agent. After the reboot, the workstation then downloads and installs the 10.0.1 msi files. The ZAA still lists the agent as 10.0.3. Any idea why the 10.0.1 files are being downloaded to the workstation after 10.0.3 is installed on the workstation? Any idea how I can get 10.0.3.2 to install on the workstation? -- moffatt ------------------------------------------------------------------------ moffatt said on 7/23/2008, ...

Updating agent 10.0.0 to 10.0.1
Hi, I did a fresh new installation of zcm to get the 10.0.1 version I have been able to re-register workstation which already had a previous agent install to the new server but now I am trying to figure out how to upgrade the agent on the workstation from 10.0.0 to 10.0.1 Anyone has a suggestion ? -Luc You can't at this point in time :<< You would need to uninstall and reinstall. Normally, even after a clean install of 10.0.1, the 10.0.0 to 10.0.1 patch would download even though you are at 10.0.1. This patch could then be authorized to push out to the 10.0.0 Cli...

Version 10.0.0 and version 10.0.1
Hi, If i have a license key for version 10.0.0, can I use the same license to download and install 10.0.1? Or does that require a separate purchase? Thanks so much. Aron Hi Aron, On 16/12/2010 4:40 PM, Aron wrote: > Hi, > If i have a license key for version 10.0.0, can I use the > same license to download and install 10.0.1? Or does that > require a separate purchase? You can use the same key. Generally, you can use the same install key across the same major version. An exception to this rule was version 11, where we changed the licensing model between 11....

SQl server 7.0 and Powerbuilder 9.0
Hello there. I have this situation we,re working with Powerbuilder 9.0 and SQL Server 7.0 with an original application developed in Powerbuilder 6.5, this mean that we made the update to 9.0, well after that in some SQL that involve string field like char or varchar the values were evaluated with double quoted like this example type in "1","2". Select * from clients Where tipo in " 1","2" Well this syntax generated error because dont recognize del double quote, now the syntax must use single quoted '1', '2' li...

10.0.0 to 10.1.0 Agent partially translated
We juste updated from 10.0 to 10.1 and all agents are now partially translated When right click on Zen icon, i get : "Refresh Afficher la progression Afficher les propri�t�s Logout Aide" And properties are all in english, but they were in french before. How can we get back the whole french version of client ? -- plizon ------------------------------------------------------------------------ plizon, > >We juste updated from 10.0 to 10.1 and all agents are now partially >translated >When right click on Zen icon, i get : > >"...

Update 10.0.0->10.0.1 for Linux
Hi, i try to update ZCM to 10.0.1 (TID 3407754) but after the download ZCM is not able to authenticate the update. Maybe because Platform is displayed as "Windows"? I found only one kind of Update-Files and the Novell-Download site says it is for Win & Linux. Has anyone installed this Update on a Linux-Box? Bye Bernd Bernd Nachtigall wrote on Tuesday, Februar 19th 2008 11:56 in novell.support.zenworks.configuration-management.10.server-install: (...) > i try to update ZCM to 10.0.1 (TID 3407754) but after the download ZCM is > not able to authent...

PowerBuilder 7.0 & SQL Server 7.0
Hi: I've develop an application that connect to and MS SQL SERVER 7.0 database via ODBC. When i make the .exe file and run it in Win95 or Windows NT Workstation it works fine, but when i run it in a Win98 client the following error apears. SQLSTATE=22005 - "Invalid character value for cast specification." Any clues about this. The exe was build in PowerBuilder 7.0 over a Windows NT Workstation 4.0 Thanks in advance. Jorge, Try adding to the dbparm - CallEscape='No'. Here is an example: SQLCA.DBParm = "Connectstring='DSN=<your ...

Powerbuilder 5.0.4 and migrating to SQL 7.0
We will be migrating from SQL 6.5 to 7.0. Does this require a recompile of Powerbuilder applications, or just pointing to the new (7.0) database in the .ini file? Any other suggestion and/or hints would be greatly appreciated. PB5 will not work with SQL 7.0. One person has said they got it working fine but the general experience, and Sybase's position, is that you need to upgrade to PB6.5 or 7.0 Simon Dan Wolterink <wolterink@dearborn.com> wrote in message news:IxnyP3#n$GA.299@forums.sybase.com... > We will be migrating from SQL 6.5 to 7.0. Does this require...

PowerBuilder 7.0 & SQL Server 7.0
Hi: I've develop an application that connect to and MS SQL SERVER 7.0 database via ODBC. When i make the .exe file and run it in Win95 or Windows NT Workstation it works fine, but when i run it in a Win98 client the following error apears. SQLSTATE=22005 - "Invalid character value for cast specification." Any clues about this. The exe was build in PowerBuilder 7.0 over a Windows NT Workstation 4.0 Thanks in advance. Jorge, Try adding to the dbparm - CallEscape='No'. Here is an example: SQLCA.DBParm = "Connectstring='DSN=<your ...

Connect MS-SQL 7.0 in PowerBuilder 7.0
In PowerBuilder 6.5, I can connect MS-SQL 6.5 directly not using ODBC, but in PowerBuilder 7.0, how can I connect MS-SQL 7.0 directly ? Please post to the powersoft.public.powerbuilder newsgroups This is dedicated to PB issues when used within Jaguar Masun wrote: > In PowerBuilder 6.5, I can connect MS-SQL 6.5 directly not using ODBC, but > in PowerBuilder 7.0, how can I connect MS-SQL 7.0 directly ? ...

Powerbuilder 10.2 and Oracle 10.2.0.3
Hi, Is anyone aware of any documentation that shows if Powerbuilder 10.2 is compatible with Oracle 10.2.0.3 Windows Client? Thanks in advance. http://www.sybase.com/detail?id=1011566 It will work with the 10.2 client, it's just if there are special features for that version PB 10.2 won't know about them (it supports up through 10.1). On Fri, 4 Jul 2008 10:35:38 -0700 (PDT), arch.gopal@gmail.com wrote: >Hi, > >Is anyone aware of any documentation that shows if Powerbuilder 10.2 >is compatible with Oracle 10.2.0.3 Windows Client? > >Thanks in advance. ...

Web resources about - Dynamic SQL in a PowerBuilder 10.0 program - sybase.powerscript

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

Sybase PowerBuilder tool readied for Microsoft's .Net
... Win32 or newer style .Net development After several years of work, Sybase is ready to deliver on the final step in its plan to move PowerBuilder ...

Jim O'Neil (@jimoneil) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Open Directory - Computers: Programming: Languages
about dmoz - dmoz blog - report abuse/spam - help the entire directory only in Programming/Languages Description Top : Computers : Programming ...

The HP Booth Staff (Goons) Owe Me an Apology
... when you might need to use it. For instance, when I was in the WinRunner world there were plugins for driving terminal emulators and powerbuilder ...

Contact Us - Sybase Inc
Thanks for visiting the 主页 section of Sybase.com. Here you will find information about Contact Us. For more information about Business Intelligence, ...

热门搜索 - 我的异常网
... 我的异常网 » 热门搜索 sdpnet2 移动【A111】其它用户原因鉴权失败,是什么意思啊 http:// 192.168.1.102:22578 本网站服务器位于美国,受美国法律保护 MiniUI js 破解 http://192.168.1.103:8080/ powerbuilder ...

Mobile app security: Always keep the back door locked
The best way to keep mobile apps safe is to secure the services they connect to.

10 Tech Skills That Will Instantly Net You A $100,000+ Salary
... that let's developers run Java applications. Java is highly popular language for writing web apps and custom enterprise apps. No. 8: PowerBuilder ...

Top Ranked Articles
Top Ranked Articles - Free source code and tutorials for Software developers and Architects.; Updated: 23 Feb 2013

Resources last updated: 3/9/2016 12:54:37 AM