Ask a Question related to Coldfusion Database Access, Design and Development.
-
HongKongSunny #1
Help with updating in SQL
below is my query:
<cfquery name="CreateMyProfile" datasource="Dating">
Update MemberMain
Set MyProfile = '1', ScreenName = '#Form.ScreenName#', Sex = '#Form.Sex#',
Marital = '#Form.Marital#', LivingCountry = '#Form.LivingCountry#', Email =
'#Form.Email#', PersoanlTitle = '#Form.PersonalTitle#', PersonalDesc =
'#Form.PersonalDesc#', Height = '#Form.Height#', Weight = '#Form.Height#',
Smoking = '#Form.Smoking#', Drinking = '#Form.Drinking#', Education =
'#Form.Education#', MyRelationShip = '#Form.Relationship#', RelationShip1 =
'#Form.Relationship2#', RelationShip3 = '#Form.Relationship3#' , RelationShip4
= '#Form.Relationship4#', LookingFor = '#Form.LookingFor#', LookingForStartAge
= '#Form.LookingForStartAge#', LookingForEndAge = '#Form.LookingForEndAge#',
LookingForMarital = '#Form.LookingForMarital#', LookingForMarital1 =
'#Form.LookingForMarital1#', LookingForMarital2 = '#Form.LookingForMarital2#',
LookingForMarital3 = '#Form.LookingForMarital3#', LookingForRelationship =
'#Form.LookingForRelationship#', LookingForRelationship1 =
'#Form.LookingForRelationship1#', LookingForRelationship2 =
'#Form.LookingForRelationship2#', LookingForRelationship3 =
'#Form.LookingForRelationship3#', LookingForRelationship4 =
'#Form.LookingForRelationship4#', LookingForEducation =
'#Form.LookingForEducation#', LookingForEducation1 =
'#Form.LookingForEducation1#', LookingForEducation2 =
'#Form.LookingForEducation2#', LookingForEducation3 =
'#Form.LookingForEducation3#', LookingForEducation4 =
'#Form.LookingForEducation4#' where MemberID = '#Session.MemberID#'
</cfquery>
but it come out with error like that:
The error occurred in D:\Inetpub\wwwroot\createprofile2.cfm: line 248
Called from D:\Inetpub\wwwroot\createprofile2.cfm: line 1
Called from D:\Inetpub\wwwroot\createprofile2.cfm: line 248
Called from D:\Inetpub\wwwroot\createprofile2.cfm: line 1
246 : <cfquery name="CreateMyProfile" datasource="Dating">
247 : Update MemberMain
248 : Set MyProfile = '1', ScreenName = '#Form.ScreenName#', Sex =
'#Form.Sex#', Marital = '#Form.Marital#', LivingCountry =
'#Form.LivingCountry#', Email = '#Form.Email#', PersoanlTitle =
'#Form.PersonalTitle#', PersonalDesc = '#Form.PersonalDesc#', Height =
'#Form.Height#', Weight = '#Form.Height#', Smoking = '#Form.Smoking#', Drinking
= '#Form.Drinking#', Education = '#Form.Education#', MyRelationShip =
'#Form.Relationship#', RelationShip1 = '#Form.Relationship2#', RelationShip3 =
'#Form.Relationship3#' , RelationShip4 = '#Form.Relationship4#', LookingFor =
'#Form.LookingFor#', LookingForStartAge = '#Form.LookingForStartAge#',
LookingForEndAge = '#Form.LookingForEndAge#', LookingForMarital =
'#Form.LookingForMarital#', LookingForMarital1 = '#Form.LookingForMarital1#',
LookingForMarital2 = '#Form.LookingForMarital2#', LookingForMarital3 =
'#Form.LookingForMarital3#', LookingForRelationship =
'#Form.LookingForRelationship#', LookingForRelationship1 =
'#Form.LookingForRelationship1#', LookingForRelationship2 =
'#Form.LookingForRelationship2#', LookingForRelationship3 =
'#Form.LookingForRelationship3#', LookingForRelationship4 =
'#Form.LookingForRelationship4#', LookingForEducation =
'#Form.LookingForEducation#', LookingForEducation1 =
'#Form.LookingForEducation1#', LookingForEducation2 =
'#Form.LookingForEducation2#', LookingForEducation3 =
'#Form.LookingForEducation3#', LookingForEducation4 =
'#Form.LookingForEducation4#' where MemberID = '#Session.MemberID#'
249 : </cfquery>
250 : <cflocation url="myprofile.cfm" addtoken="yes">
--------------------------------------------------------------------------------
SQL Update MemberMain Set MyProfile = '1', ScreenName = 'Sunny', Sex = '1',
Marital = '3', LivingCountry = '2', Email = 'sunny722@gmail.com', PersoanlTitle
= '', PersonalDesc = '', Height = '140', Weight = '140', Smoking = '0',
Drinking = '0', Education = '1', MyRelationShip = 'true', RelationShip1 =
'false', RelationShip3 = 'false' , RelationShip4 = 'false', LookingFor = '0',
LookingForStartAge = '18', LookingForEndAge = '25', LookingForMarital = 'true',
LookingForMarital1 = 'false', LookingForMarital2 = 'false', LookingForMarital3
= 'false', LookingForRelationship = 'true', LookingForRelationship1 = 'false',
LookingForRelationship2 = 'false', LookingForRelationship3 = 'false',
LookingForRelationship4 = 'false', LookingForEducation = 'true',
LookingForEducation1 = 'false', LookingForEducation2 = 'false',
LookingForEducation3 = 'false', LookingForEducation4 = 'false' where MemberID =
'1'
DATASOURCE Dating
VENDORERRORCODE 3088
SQLSTATE
can anybody tell me why?
HongKongSunny Guest
-
Updating Updating site map or archive dynamically
Hi there! ;-) Posted in Site Design as well.... Anyone know if there is a way to use Contribute to automatically/dynamically update a site map... -
Updating 3.0 to 3.1. Or not.
What is an MSP file and how do I use it to update Contribute 3.0 to 3.1? The updater FAQ says just double click on the downloaded file but the... -
Updating
So I've been asked to look into a design question for our company. We're looking toward building a web delivered product sometime down the road. ... -
Updating AI Files causes position to 'bounce' when updating in Quark
Is there any way to build Illustrator files so that no matter what edit you might come back and make to the AI file, when you update the modified... -
XP updating
The internet connection I have available is 28.8K max. There is no DSL, cable, or anyother type of high speed connection available for my... -
jdeline #2
Re: Help with updating in SQL
Just a guess, but you may be trying to insert a text value into a numeric
field. For example, WHERE MemberID = '1': is MemberID really a text field?
Also, it might be that 'false' should have the single quotes removed, depending
upon how the fields are defined in the database.
jdeline Guest
-
CF_Oracle #3
Re: Help with updating in SQL
Looks like you missed RelationShip2 (see in your code RelationShip1 = '#Form.Relationship2#'). Then if this is the case and RelationShip2 is NOT NULL field then it throw an error.
CF_Oracle Guest



Reply With Quote

