Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Delphi3 & SQL Anywhere

Posted on 1997-11-10
3
Medium Priority
?
299 Views
Last Modified: 2010-04-04
These questions relate to Delphi3 with SQL Anywhere.
1. Using tables with autoIncrement fields. After insert/post the value assigned to the autoIncrement field is not available. To get it I need to do a last with the field as the index. This is not good.
The value is available after the post when using Paradox and Access tables.

2. When using a TQuery and a DBGrid, new records do not appear in the grid unless I refresh the query by close/open. If I substitute a TTable it works fine.

I must be missing something in the SQL Anywhere/odbc options but just what escapes me.
0
Comment
Question by:wilkinsbryan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
anilms earned 150 total points
ID: 1349863
But that is the way an RDBMS like Sybase/MS SQL Server/Oracle works. It is the case not ony with Delphi, it is the same with VB also.

1. Paradox gives you the data updated immediately because you are using a TTable.

2. If you are using TQuery and DBGrid with Paradox/DBF, then also you have to do a refresh by close/open to update the view. Otherwise it will not reflect the latest status.

You are not missing anything anywhere, it is the way it works with RDBMS.
0
 

Author Comment

by:wilkinsbryan
ID: 1349864
Thank you for that.
I was not specific enough in my second question. The records which do not appear are the ones added by the user. They are added to the DBGrid and when the grid is scrolled the record is no longer there. This does not seem to good.
0
 

Author Comment

by:wilkinsbryan
ID: 1349865
Further info, FYI
I got a response from the Delphi news group which suggested that I use 'select @@identity' to get the autoIncrement number. Works fine.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question