Hello All,

Naive guy here...would cfinsert be suitable in this situation? Whih
leads me to another question; which is more effective/efficient /?
Cfinsert or an SQL insert statement?



Truly,

Guy J. McDowell, M.M.C.P.
(705) 324-9144 ex 3422
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~
Sir Sandford Fleming College
Frost Campus
P.O. Box 8000
Lindsay, Ontario
K9V 5E6


>>> [EMAIL PROTECTED] 02/24/03 09:56AM >>>
FlashGuy wrote:
> 
> <cfquery name="qInsertData" DATASOURCE="results">
> Insert into myresults
> (strFileName, strCommand, strCreatedOn, strLastAcc, strLastMod,
strSize, strDirectory, strDateCommand, strUsername)
> VALUES
> ('#Filename#', <cfqueryparam value="#strFilename#"
cfsqltype="CF_SQL_LONGVARCHAR">)
> ('#FileCommand#', <cfqueryparam value="#strCommand#"
cfsqltype="CF_SQL_LONGVARCHAR">)
> 
> ...and so on...
> 
> </cfquery>

> Is this the correct syntax?

No: http://www.mysql.com/doc/en/INSERT.html 

<cfquery name="qInsertData" DATASOURCE="results">
INSERT INTO myresults (
   strFileName,
   strCommand,
   strCreatedOn,
   strLastAcc,
   strLastMod,
   strSize,
   strDirectory,
   strDateCommand,
   strUsername
   )
VALUES (
   <cfqueryparam value="#strFilename#"
cfsqltype="CF_SQL_LONGVARCHAR">,
   <cfqueryparam value="#strCommand#" cfsqltype="CF_SQL_LONGVARCHAR">,
   ...,
   ...,
   ...,
   ...,
   ...,
   ...,
   ...
   )
</cfquery>


> Is there an easier way?

No.

Jochem


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to