Entries for month: June 2006
Retrieve the ID of the last inserted record
Posted by David in ColdFusion on June 30, 2006
This topic has come up again and I thought I would show how to do this.
1. This example will only work with MS SQL Server. You are basically running an INSERT statemenet and following it up with a SELECT statement that queries for the @@Identity.
<cfquery name="qInsertUser" datasource="myDSN">
SET NOCOUNT ON
INSERT INTO USERS (username, email)
VALUES (
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#usersname#">,
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#email#">
)
SELECT @@Identity AS newID
SET NOCOUNT OFF
</cfquery>
<cfset newID = qInsertUser.newID>
2. This example will work with any type of database, including MS Access.
<cflock name="insertrecord" timeout="10">
<cfquery name="qInsertUser" datasource="myDSN">
INSERT INTO USERS (username, email)
VALUES (
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#usersname#">,
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#email#">
)
</cfquery>
<cfquery name="qGetNewID" datasource="myDSN">
SELECT MAX(RecordID) AS NewID FROM USERS
</cfquery>
</cflock>
<cfset newID = qGetNewID.NewID>
Flex 2 is here
Posted by David in ColdFusion , Flash , Flex on June 28, 2006
Well Flex 2 is finally out of Beta and is Gold now! Today is a big day. Not only did the Flex 2 platform go Gold today but the Flash Player 9 was released today as well.
ColdFusion MX 7 Updater (7.0.2) was also released yesterday. This release provides developers easy integration between ColdFusion and Flex 2 applications, and also includes important fixes.
Presentations from Adobe Developer Week
Posted by David in Web Development , Adobe on June 21, 2006
Here are the links to the Adobe Developer Week sessions that were recorded live last week:
- The Adobe Engagement Platform
- Introduction to Developing with Flex
- Introduction to Adobe LiveCycle
- Building Flex Apps with Flex Builder
- Flex Data Services
- Building Killer RIAs? Meet: Adobe's Next-Gen Technology
- Architecture and Overview of Adobe's Security Model
- ColdFusion Powered Flex
- An Introduction to Adobe LiveCycle Workflow and Qpac
- ActionScript 3 for Flash Developers
- Looking for IT Agility, Sizzling Apps & Fast Processes
- ColdFusion and Model Glue
- Using InDesign Server with Flex
- Building Applications using LiveCycle and Flex
- Flex and AJAX - Better together
- Smart Client Architecture and Processing Models
More info can be found here!
Recent Comments