CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.

YesSoftware Forums -> CodeCharge Studio -> Perl

 Retreiving the last inserted id after insert

Print topic Send  topic

Author Message

Posts: 1
Posted: 05/29/2004, 2:42 AM


I've been trying to use CCS with Perl, and the problem is that:
After inserting a record (with a record form), I want to get the auto incremented number. I am using mySql, and I know about the last_insert_id() function it provides. I'm trying to do this "SELECT last_insert_id()" on the After Insert Execution, but I always get 0. I think it's becuse that I make a new connection to the database, and I dont use the last connection the CCS Insert query used.
I also dont know how to access the last connection that the CCS Insert query used.
If anyone finds a way to solve it, I'll be grateful.

View profile  Send private message
Last Hero
Posted: 05/31/2004, 1:43 AM

use form datasource:
Alibae Newkirk
Posted: 01/09/2005, 7:15 PM

:-D Sorry, I cant help you. i use ccs to create all my web applications along with komodo but i cant figure this thing out. I stumble across your forum message while looking for information regarding the last_insert_id subroute supposedly provide it with the DB package that ccs uses . You can find me at or e-mail me at the above address and we can keep intact regarding this matter. I'll look into this further when I have more free time .
Last Hero
Posted: 01/10/2005, 2:00 AM

in afterinsert event:

$formname->{ds}->query("SELECT last_insert_id() as lst");
$last = $formname->{ds}->f("lst);

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Web Database

Join thousands of Web developers who build Web applications with minimal coding.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.