Powerbuilder datawindow

Hi!

I'm importing a some data into my application. The way I do this is to
insert a the rows into a datawindow and then do an update() on the
datawindow.

If a row in the database allready exists with the same primary key as I have
inserted into the datawindow, what will happen then? Will then datawindow do
an update or will I get an error?

I'm doing this on a datastore object. How can I get an errormessage from the
datastore? I have tried the errormessages and codes from the transaction
object (sqlca.sqlerrtext and sqlca.sqlcode).

Jan Erik


0
Jan
12/17/2001 4:25:20 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

2 Replies
1053 Views

Similar Articles

[PageSpeed] 8

> If a row in the database allready exists with the same >primary key as I
have
> inserted into the datawindow, what will happen then? Will then datawindow
do
> an update or will I get an error?

you will get an error stating that the primary key is not unique and the
datawindow will fail to update.

> I'm doing this on a datastore object. How can I get an errormessage from
the
> datastore? I have tried the errormessages and codes from the transaction
> object (sqlca.sqlerrtext and sqlca.sqlcode).

in this instance, i'm not sure that error codes will help you, as they won't
point you to which row is a duplicate. you'll get a general message that
states that the primary key is not unique.


0
Matt
12/17/2001 5:04:51 PM
<<
I'm importing a some data into my application. The way I do this is to
insert a the rows into a datawindow and then do an update() on the
datawindow.

If a row in the database allready exists with the same primary key as I 
have
inserted into the datawindow, what will happen then? Will then datawindow 
do
an update or will I get an error?

I'm doing this on a datastore object. How can I get an errormessage from 
the
datastore? I have tried the errormessages and codes from the transaction
object (sqlca.sqlerrtext and sqlca.sqlcode).
>>

The update will fail if you get a duplicate key error on the insert.  The 
status of the rows pior to the one that failed will depend upon your 
transaction management.  IOW, they may or may not be committed.

To capture any error on the update call from a datastore, you need to 
create a user object based upon a datastore and add code in the dberror 
event.  This event gets parameters already to indicate the sqlcode, 
errortext, etc.  You would need to add code to display the error or handle 
it in some other way.

HTH,

steve
[TeamSybase]
0
Steve_Katz_
12/17/2001 5:12:24 PM
Reply:

Web resources about - Powerbuilder 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 ...

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: 11/22/2015 11:57:17 AM