Update in PB Fails, but SQLA returns SQLSUCCESS...

	I recently dropped a reply to some of you here in the question of "Death
by Curly Brackets" and am not even sure the problem we're experiencing is
related, BUT basically, if we have a variable in an SQLA table of type
"char" and then declare an internal host variable in Powerbuilder 6.0, and
execute an Insert or an Update against the table, PB and/or SQLA both
return success, but the table DOES NOT get updated... here's futher
details... Check out the ODBC dump below

ANY HELP IS SINCERELY APPRECIATED...

MY EARLIER NOTES:
	Just a quick note on the update of fields declared as type "char" in
Powerbuilder. We recently obtained a "patch" from Powersoft to fix the
"TSEQUAL" problems in PB 6.0. ( TSEQUAL functionality did not work since PB
never retrieved fields declared as type and name "TIMESTAMP". The 2 updated
DLL's may be our problem, since we did not really catch the "Update" or
"Insert" problem until after we applied the TSEQUAL fix. The 2 DLL's in
question are PBVM60.dll -> 12/09/97 4:07AM AND PBDWE60.dll of the same date
and timestamp. Our problem here is very repeatable. Create a small table
with a primary key and some data field of type char in SQLAnywhere. Then�
in PB execute an embedded SQL statement such as Update Table_Name Set
This_Field = :HostVariable Where Key_Field = :AnotherHostVariable Using
SQLCA; Make sure that one of the host variables is declared like this �
char HostVariable � in PB. Note that this is PB 6.0. When I check the
SQLCA.SQLCode just after the above transaction, it is always 0 (NO ERROR).
SQLCA.DbErrCode is also 0. When I then inspect the table via ISQL (or
something else) the data did NOT change. When looking at the ODBC dump
here's an example:

pb60            e2:bd	ENTER SQLAllocStmt 
		HDBC                0x004b1840
		HSTMT *             0x0012e694

pb60            e2:bd	EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
		HDBC                0x004b1840
		HSTMT *             0x0012e694 ( 0x004a6a80)

pb60            e2:bd	ENTER SQLExecDirect 
		HSTMT               0x004a6a80
		UCHAR *             0x0a5307b8 [      -3] "update Qa_Sample_History Set
User_Code =32 , Result =3.10000 , Cust_Result =3.10000 Where Facility ='Wa'
And Warehouse ='Wa' And Test_Type =20 And Machine ='3R�' And Julian =6317
And Set_Number =20 And Cut =3 And Position =1 And Subgroup_No =1 "
		SDWORD                    -3
pb60            e2:bd	ENTER SQLAllocStmt 
		HDBC                0x004b1840
		HSTMT *             0x0012e694

pb60            e2:bd	EXIT  SQLAllocStmt  with return code 0 (SQL_SUCCESS)
		HDBC                0x004b1840
		HSTMT *             0x0012e694 ( 0x004a6a80)

pb60            e2:bd	ENTER SQLExecDirect 
		HSTMT               0x004a6a80
		UCHAR *             0x0a5307b8 [      -3] "update Qa_Sample_History Set
User_Code =32 , Result =3.10000 , Cust_Result =3.10000 Where Facility ='Wa'
And Warehouse ='Wa' And Test_Type =20 And Machine ='3R�' And Julian =6317
And Set_Number =20 And Cut =3 And Position =1 And Subgroup_No =1 "
		SDWORD                    -3

pb60            e2:bd	EXIT  SQLExecDirect  with return code 0 (SQL_SUCCESS)

		NOTE THE FIELD "Machine" above! It was declared as type "char" in PB.
What are the screwy characters after it. The Update did not take place
because NO Machine value was equal to that combo of characters, BUT ALSO
NOTE THAT THE SQL RETURN CODE WAS SUCCESS� Please return an email to 

0
Randy
6/3/1998 1:01:30 PM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

0 Replies
366 Views

Similar Articles

[PageSpeed] 39

Reply:

Similar Artilces:

Update Fails to SQLAnywhere, but PB/ODBC/SQLAnywhere returns Success...
I recently dropped a reply in the SQLAnywhere Newsgroup regarding the question of "Death by Curly Brackets" and am not even sure the problem we're experiencing is related, BUT basically, if we have a variable in an SQLA table of type "char" and then declare an internal host variable in Powerbuilder 6.0, and execute an Insert or an Update against the table, PB and/or SQLA both return success, but the table DOES NOT get updated... here's futher details... Check out the ODBC dump below, is this a bug in PB, ODBC, SQLAnywhere or ALL of the above ANY HELP IS ...

Return charater causes DW update error and PB crash (re-post from the pb.general group)
Hi All PB 10.0.1, MSSQLServer 2000 We've got a field (defined as Char) that takes standard input... included in this is the odd carriage return (though we've got triggers preventing saving of said bad character).. When this was running with PB 8, the save went through without issue... As soon as app was migrated to PB 10 (no change in back end with migration to 10), the save started blowing up (cannot insert NULL error, even though we can see the value in the insert/update statement... only weird part is that in both the error msg and a DB Trace, the return key...

Install PB 10 update without needing to install PB 9 update, then PB 8 update....
We have a bunch of updates to PB. Is there a way we can install PB 10 without needing to install all the previous versions of PB? If all you have is an update version, then you'll need to have some previous version of PB installed. On 4 Mar 2005 05:54:11 -0800, "Daniel Coppersmith" <daniel_N.0.S.P.A.M_at_InFrontSoftware_D0T_C0M> wrote: >We have a bunch of updates to PB. Is there a way we can install PB 10 >without needing to install all the previous versions of PB? > > Bruce Armstrong [TeamSybase] http://www.teamsybase.com Vote for D...

Insert row fails, but update returns 1
I am having a problem with inserting rows into an ASE 11.5.2 database. I am using the maintenance release of PB and Jaguar. There are fields in the chosen table that will not allow nulls. When one of these fields is set to null: When a row is inserted the Update () function will return 1. However, the database is not actually updated and the datawindow will generate error messages in the error log of Jaguar. When a row is being updated, the Update() function will return -1. The database is not updated, error messages will be written and the client gets notified because of th...

PB 803 Update: Java Registration Failed
At the end of the pb 8.0.3 update a "Setup is completing the self-registration process" dialog is displayed. After that dialog a "Java Registration Failed" msg was displayed. Then a "Severe: First call to DeleteFile Failed." Any ideas/suggestions? Thanks, Doug P.S. Although I'm reluctant to suggest that Sybase take any cues from Oracle, the folks at Sybase might learn something by running Oracle Universal Installer. What is your OS? If it is WinXP, then you should first install Java Virtual Machine which is no longer installed by default ...

Updates Updates Updates
I was a big fan of Firefox.. Now, I don't even like to use it. Seems like every time I start it up I have to update some addin OR the browser itself. And unfortunately the update nag messages are always presented when I start a browsing session. I find this annoying because, typically, when I open a web browser all I want to do is go to a web page. Not update the browser. I can agree that staying current with the latest version could give the best, fastest, safest web experience. But that point becomes mute when I start off every other browsing session with a new update. And mos...

updates, updates, updates, NO MORE!
Name: Andreas Email: unbekanntatjokerdotms Product: Firefox Summary: updates, updates, updates, NO MORE! Comments: Hi ! if you want to develop a fine webbrowser, maybe you nee a new management. To release a new buggy version every two weeks is not very professional. Test your software before the release and let the user download a stable browser. this update-orgy since 2.0.0 used me to use Opera instead of FF. We haved use FF in our Company, but we can't deploy a new version every week to +200 Windows-clients, so in our company we've decided to return to IE, ...

powerbuilder update fails to return error in mysql
Hi Friends this is all about powebuilder i am using powerbuilder 7 and mysql the issue is i created an before update trigger on a table where in i raised error if a column status = 'A'. If i update table using sql update it raised error and transaction fails. But with my powerbuilder application my datawindow get updated it cannot trace the sql_error. update() didnt return any thing and rows_affected return valid rows it updated the table. Even though there is an error in trigger. Funny part is the after update triggers or any other dependent trigger also fails Stra...

updates, updates, updates
Name: hans jensen Email: hansjensen44_athotmaildotcom Product: Firefox Summary: updates, updates, updates Comments: why is it everytime i go online firefox has new updates, 3 -4 times every day, its never ending..........whats all the problems??? please email me and let me know, ty,.........Hans Jensen Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 ...

Updates, updates and more updates
Name: pirhan Email: pirhan_chanathotmaildotcom Product: Firefox Summary: Updates, updates and more updates Comments: Hello, Normally I use Safari, but my iBook is out of commission for a while. So, I am forced to use a PC to which I would much rather use Firefox than Internet Exploder. However, as much I enjoy not using a Microsoft product, and use a product that works decently, I am severely annoyed about the constant updates I am put through. In the last two days, I had to wait for Firefox to install updates before I could browse and now, I'm alerted that there'...

updates, updates, updates
Holy Crap, Batman! You'd think I was running Windows XP and it's patch Tuesday. So far this week - new kernel (2.6.27.10), 2 new browsers (Opera 9.63 and Firefox 3.05) and a new plugin (Flash 10.0.156.3). I'm about ready to try one od the BSD's! vince wrote: > Holy Crap, Batman! You'd think I was running Windows XP and it's patch > Tuesday. > > So far this week - new kernel (2.6.27.10), 2 new browsers (Opera 9.63 > and Firefox 3.05) and a new plugin (Flash 10.0.156.3). I'm about ready > to try one od the BSD's! I take ...

Update failing due to carriage return in parameter value
When I make a call to a stored procedure to update a record, the update does not happen.  No error is thrown, there are just no rows updated.  When I look at SQL Server Profiler, this is what I see: exec TTN_Update_RecurringIssueVehicle @RecurringIssueVehicleID='00962233-6EC3-42CE-ABBD-1851F1176D63',@RecurringIssueID='66FE821A-9881-4368-B975-5B04975C5E16',@RecurringIssueProblemID='ABED20CD-CB37-4491-903F-553555EEE47C',@MarketID=1,@VehicleNumber=268,@AddedDate=N'12/14/2006 3:30:00 PM',@AddedBy=12,@ResolvedDate=N'12/15/2006 10:19:45 AM',@ResolvedBy=12   It seems to be putting...

Return code of DW update with stored procedure in PB 7
I have a datawindow with stored procedure for UPDATE, DELETE & INSERT. After I issue dw.update( ) method, I want to check whether it is success or not. However, the return value is alway 1. 1. Is it the same way in checking the return value for datawindow with / without stored procedure ? 2. Is there any other way to check whether the execution of stored procedure is Ok or not ? What driver are you using? We had a similar problem with OLEDB. -- Simon Caldwell Get Real Systems Ltd Holtby Manor, Stamford Bridge Road, York, YO19 5LL Tel 01904 481999 Fax 01904 4816...

Incorrect SQLCode returned after embedded sql update in PB version
Hi All, I have recently migrated a PB application from PB version 10.2.0 Build 8011 to PB version 10.5.0 Build 4523. I did not encounter any errors during the migration but an issue with the SQLCode has arisen during testing. The application contains a lot of embedded SQL update and delete statements and the SQLCode is checked after each statement. I find that following a delete or an update statement, that does not affect any rows, I get a SQLCode = -1 and the SQLDBCode = 100. In the 10.2 compiled version of the application the SQLCode was 0 and the SQLDBCODE was 100 for the sam...

Web resources about - Update in PB Fails, but SQLA returns SQLSUCCESS... - sybase.sqlanywhere.general

Resources last updated: 1/3/2016 6:23:19 AM