Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.4K Intelligent Advisor
- 75 Insurance
- 537.6K On-Premises Infrastructure
- 138.7K Analytics Software
- 38.6K Application Development Software
- 6.1K Cloud Platform
- 109.6K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.3K Infrastructure Software
- 105.4K Integration
- 41.6K Security Software
Row not getting updated, No errors thrown

Hi,
I am using the Timesten ODBC interface for C to program an application which updates some rows in a timesten DB based on inputs received.
It prepares the sql statement using SQLPrepare and then fires the query using SQLExecute.
What is happening is sometimes the rows are NOT getting updated even though no errors where thrown.
Does the function SQLExecute wait for update statement to complete before returning a success message or is it fire and forget.
Is its possible that the queries my application is firing getting timed out , but since the function returned a success message the issue was not caught.
What possible precautions can i take to avoid this kind of errors.
Any help is appreciated.
Thanks.
Answers
-
ChrisJenkins-Oracle Senior Director, In-Memory Technology United KingdomMember Posts: 3,412 Employee
SQLExecute is completely synchronous; when it returns the target rows (if any) will have been updated. Of course those updates are not visible to queries from any other session until the UPDATE(s) have been committed.
I see several possibilities for the behaviour that you report:
1. You are UPDATEing via one connection and querying via a different connection and you have not committed the updates so the queries do not see the updated rows.
2. There is some mistake in the UPDATE statement(s) such that it is not actually updating any rows. This could be a SQL issue or a programming issue e.g. related to bind variables etc.
3. There is some mistake in the queries that you are issuing such that they are not properly finding the correct rows. This could be a SQL issue or a programming issue e.g. related to bind variables etc.
What value is returned in the 'pcrow' argument when you call SQLRowCount() against the statement handle used for the UPDATE immediately after SQLExecute returns? When executing DML you should always check SQLRowCount() afterwards to see who many rows were affected. This might give you a clue as to where the problem lies.
Chris