problem about insert
Kay C Lan
lan.kc.macmail at gmail.com
Sat Oct 15 01:31:31 EDT 2005
On 10/13/05, Supote Songthammawat <supote.songthammawat at netgalileo.com>
wrote:
>
> Dear Sir,
>
> I have some problem about insert data by sql into database. Why
> I can't not to insert into database? When I press button save it will
> occur :
>
> put tNewEnPersonSysIds into tNewPersonSysIds
> put fld "FirstName" into tFirstName
> put fld "LastName" into tLastName
> put fld "MiddleName" into tMiddleName
> put text of fld "DateofBirth" into tDateofBirth
> put 1 into tPersonTitleCode
> put the hilitedButtonName of group "Identification" into tGenderCode
> put 1 into tDeceasedIndicator
> put 1 into tOrganDonorIndicator
> put 1 into tMultipleBirthIndicator
>
> put tNewPersonSysIds, tFirstName, tLastName, tMiddleName, tDateofBirth,
> tPersonTitleCode, \
> tGenderCode, tDeceasedIndicator, tOrganDonorIndicator,
> tMultipleBirthIndicator into tPersonEntTbl
>
> put "INSERT INTO PERSON_TABLE(personSysID, firstName, lastName, " \
> && "middleName, dateOfBirth, personTitleCode, genderCode,
> deceasedIndicator, " \
> && "organDonorIndicator, multipleBirthIndicator) VALUES
> ("&tPersonEntTbl&")" into tSql
>
> revExecuteSQL tID, tSql
>
> I think I must convert to unidecode before insert , correct?
> Please suggest me to solve this problem. Thank you very much.
> Urgently!!!!!!!!!!!!!
I see you have asked this question twice with no response so I will have a
guess.
Your variable tPersonEntTbl seems to store data like this:
00001,John,Witherspoon,Cecil,01/11/39, etc etc
I think for an INSERT command to work in MySQL you need
"00001","John","Witherspoon","Cecil","01/11/39","<data>","<data>",etc
Getting those quotes the right place can be very tricky
HTH
More information about the use-livecode
mailing list