Ok... developing a new website using CFWHEELS framework on CF9 & MSSQL 2008 R2
Everything is working fine except that after I insert some data to the DB and request the primary key it return invalid.
At the begging I thought was a CFWHEELS bug so I created my own CFQUERY.
Here is what I have
<cfquery name="qryInsert" datasource="medriseResearch" result="qryUser">
INSERT INTO tbl_users (userFirstname, userLastname, userAddress, userAddress2, userCity, userState, userZipcode, userCountry, userBirth, userEmail, userCellphone, userHomephone, userRace, userMarital,userGender)
VALUES ('#Form.TXTFNAME#','#Form.TXTLNAME#','#Form.TXTADDRESS#','#Form.TXTADDRESS2#','#Form.TXTCITY#','#Form.DROPSTATES#','#Form.TXTZIPCODE#','US','#Form.TXTDOB#','#Form.TXTEMAIL#','#Form.TXTCELLPHONE#','#Form.TXTHOMEPHONE#','#Form.DROPRACE#','#Form.DROPMARITAL#','#Form.DROPGENDER#')
</cfquery>
<cfquery name="qryProfile" datasource="medriseResearch">
INSERT INTO tbl_advanceprofiles (userId,medicalInsurance,medicalCondition,educationLevel,employeeStatus,employeeIncome)
VALUES (#qryUser.IDENTITYCOL#,'#Form.dropHealthinsurance#','#Form.dropCondition#','#Form.dropEducation#','#Form.dropEmpstatus#','#Form.dropIncome#')
</cfquery>
The first insert works and it saves the data to my DB. But the second INSERT does not work I get an error saying that qryUser.IDENTITYCOL is invalid.
Any idea why this is happening?