Fayo Report post Posted 09/05/2003 06:11 PM Hello, Is this possible? I use a query to UPDATE my database. In fact this query add a new issue in our database. I would like to get the ticket number of this new issue created. Is there a way to do that. I am using the Query module to Update my database. Thank you. Share this post Link to post
SupportTeam Report post Posted 09/06/2003 01:03 AM This is more of a database programming or a general programming question then a VoiceGuide related question, Off the top of my head there would be two approaches to generating a ticket number: 1. Create an numeric index field in the database table (in MS Access the data type is called an "AutoNumber"). Whenever a new entry in the database table is created a new unique value will be assigned by the database to that field. Then just retrieve that field as part of your SQL query. 2. Store the ticket number is a text file and use a VBScript to read the contents of that file, save the current value in the database when the UPDATE query is ran, then increment the value and save the new value back in the file for the next time the ticket number is used. (approach 1 is preferred as under high load you may run into file locking issues with approach 2) Share this post Link to post