Re: CFQuery to Database

2012-03-11 Thread Russ Michaels

if its just a few records then use query of query to get your subset of
results and then insert the results into database B

if this is a regular occurrence and happens often then then you may want to
look at creating a DTS script on your SQL server and scheduling that to do
the job.


On Sat, Mar 10, 2012 at 10:32 PM, IT (Pradeep Viswanathan) 
prade...@emiratesnbd.com wrote:


 I have couple of records which are filtered from data source x which is
 oracle based and require to insert it into datasource y which is MS SQL
 server.

 The number of rows, columns is not fixed, however I have the records in a
 Query object, what would be the best way to insert get this data into the
 other database?

 Thanks in advance.


 DISCLAIMER:
 This e-mail message including any of its attachments is intended solely
 for the addressee(s) and may contain privileged information. If you are not
 the addressee or you have received this email message in error, please
 notify the sender who will remove your details from its database. You are
 not authorized to read, copy, disseminate, distribute or use this e-mail
 message or any attachment to it in any manner and must delete the email and
 destroy any hard copies of it.
 This e-mail message does not contain financial instructions or commitments
 of any kind. Any views expressed in this message are those of the
 individual sender and do not necessarily reflect the views of Emirates NBD
 PJSC, or any other related subsidiaries, entities or persons.


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350349
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: CFQuery to Database

2012-03-11 Thread IT (Pradeep Viswanathan)

Thanks Russ, Scott@fussionapps has been kind enough to give me a nice code..  
The little challenge was that the columns were not fixed and query  results are 
completely dyanmic... 

Just posting it here for reference 

CFLOOP query=qry_data
CFQUERY name=qry_insert datasource=#request.dsn#
INSERT INTO SomeTable (
CFLOOP from=1 to=#Listlen(qry_data.ColumnList)# index=i
#qry_data.GetMetaData().GetColumnName(i)#
CFIF !i EQ ListLen(qry_data.ColumnList), /CFIF
/CFLOOP)

VALUES (
CFLOOP from=1 to=#Listlen(qry_data.ColumnList)# index=i
!--- Putting these into variables to make it easier for you to reuse later if 
needed ---
CFSET variables.ColumnName = qry_data.GetMetaData().GetColumnName(i)
CFSET variables.ColumnType = qry_data.GetMetaData().GetColumnTypeName(i)
CFSET variables.ColumnData = 
qry_data[qry_data.GetMetaData().GetColumnName(i)][qry_data.currentrow]

!--- Check Len so we can insert NULLs where needed ---
CFIF Len(variables.ColumnData)
#variables.ColumnType#
CFSWITCH expression=#variables.ColumnType#
!--- Things that need to be wrapped in single quotes(add as needed) ---
CFCASE value=VARCHAR,NVARCHAR,DATETIME,SMALLDATETIME,UNIQUEIDENTIFIER
'#variables.ColumnData#'
/CFCASE

!--- You can add other cases here if you want ---

!--- Things that dont ---
CFDEFAULTCASE
#variables.ColumnData#
/CFDEFAULTCASE
/CFSWITCH
CFELSE
NULL
/CFIF
CFIF !i EQ ListLen(qry_data.ColumnList), /CFIF
/CFLOOP)
/CFQUERY
/CFLOOP
/CFOUTPUT


Note: small corrections may be required to the code.

-Original Message-
From: Russ Michaels [mailto:r...@michaels.me.uk] 
Sent: Sunday, March 11, 2012 1:48 PM
To: cf-talk
Subject: Re: CFQuery to Database


if its just a few records then use query of query to get your subset of results 
and then insert the results into database B

if this is a regular occurrence and happens often then then you may want to 
look at creating a DTS script on your SQL server and scheduling that to do the 
job.


On Sat, Mar 10, 2012 at 10:32 PM, IT (Pradeep Viswanathan)  
prade...@emiratesnbd.com wrote:


 I have couple of records which are filtered from data source x which 
 is oracle based and require to insert it into datasource y which is MS 
 SQL server.

 The number of rows, columns is not fixed, however I have the records 
 in a Query object, what would be the best way to insert get this data 
 into the other database?

 Thanks in advance.


 DISCLAIMER:
 This e-mail message including any of its attachments is intended 
 solely for the addressee(s) and may contain privileged information. If 
 you are not the addressee or you have received this email message in 
 error, please notify the sender who will remove your details from its 
 database. You are not authorized to read, copy, disseminate, 
 distribute or use this e-mail message or any attachment to it in any 
 manner and must delete the email and destroy any hard copies of it.
 This e-mail message does not contain financial instructions or 
 commitments of any kind. Any views expressed in this message are those 
 of the individual sender and do not necessarily reflect the views of 
 Emirates NBD PJSC, or any other related subsidiaries, entities or persons.


 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350350
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: PSA - Daylight Savings Time

2012-03-11 Thread Raymond Camden

And in theory, CF10's scheduled task service should allow you to
handle that with it's onMisfire support.


On Sat, Mar 10, 2012 at 7:54 AM, Cameron Childress camer...@gmail.com wrote:

 You probably won't forget that DST changes this weekend.  But you may
 forget that this means the hour between 2:00a and 3:00a doesn't exist on
 Sat night / Sun morning.  So on Monday when you are wondering... *THAT* is
 why your 2:15am scheduled task didn't run over the weekend...

 -Cameron

 --
 Cameron Childress
 --
 p:   678.637.5072
 im: cameroncf
 facebook http://www.facebook.com/cameroncf |
 twitterhttp://twitter.com/cameronc |
 google+ https://profiles.google.com/u/0/117829379451708140985


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350351
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Thank God for query params. ;)

2012-03-11 Thread Dave Watts

 I often amazed why simple cf tags like cfqueryparam and even cfoutpout don't 
 get pimped enough. Stuff CF developers
 don't worry as much as PHP, ASP, or RoR developers would.

It's a minor pain to create prepared statements in PHP, but it's very
easy to do so in ASP.NET.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350352
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Thank God for query params. ;)

2012-03-11 Thread Phillip Duba

That was the one thing I thought was interesting when I just recently
completed the .NET training. They taught query params in all their examples
dealing with database interactions. I found that refreshing,

Phil

On Sun, Mar 11, 2012 at 1:47 PM, Dave Watts dwa...@figleaf.com wrote:



 It's a minor pain to create prepared statements in PHP, but it's very
 easy to do so in ASP.NET.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350353
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Thank God for query params. ;)

2012-03-11 Thread Mike Stemle

All major languages with abstracted DBMS layers have bind parameters, most of 
which provide similar security and control (some with greater control) to 
cfqueryparam. Perl's DBI and PHP's DBO come to mind. 

Anybody getting hit with SQL injection these days is very likely making a silly 
mistake by ignoring a common and simple feature in their respective DBMS layer. 

~ Mike Stemle, jr.

On Mar 11, 2012, at 0:56, Michael E. Carluen mecarl...@gmail.com wrote:

 
 I often amazed why simple cf tags like cfqueryparam and even cfoutpout don't 
 get pimped enough. Stuff CF developers don't worry as much as PHP, ASP, or 
 RoR developers would.
 
 
 On Mar 10, 2012, at 9:43 PM, Justin Scott leviat...@darktech.org wrote:
 
 
 An IP from the Ukraine was attacking my contact form with name values like:
 
 John 1) declare @q varchar(8000) select @q =
 0x57414954464F522044454C4159202730303A30303A313527 exec(@q) --
 
 Indeed, this looks like an initial reconnaissance injection to see if
 other commands would work (that hex value decodes to WAITFOR DELAY
 '00:00:15').  This would cause a page load to be delayed a short
 period so they know the command executed on the database server before
 moving on to more interesting attacks.
 
 
 -Justin
 
 
 
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350354
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Fwd: kony2012

2012-03-11 Thread Brian Thornton

Have you guys seen this video...
-- Forwarded message --
From: Fred Day fs...@msn.com
Date: Mar 11, 2012 9:06 PM
Subject: kony2012
To: Brian Thornton vegasthorn...@gmail.com

 http://www.youtube.com/watch?v=Y4MnpzG5Sqc


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350355
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fwd: kony2012

2012-03-11 Thread Greg Morphis

Kinda off topic for this list, don't you think?
On Mar 11, 2012 8:08 PM, Brian Thornton br...@cfdeveloper.com wrote:


 Have you guys seen this video...
 -- Forwarded message --
 From: Fred Day fs...@msn.com
 Date: Mar 11, 2012 9:06 PM
 Subject: kony2012
 To: Brian Thornton vegasthorn...@gmail.com

  http://www.youtube.com/watch?v=Y4MnpzG5Sqc


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350356
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fwd: kony2012

2012-03-11 Thread Brian Thornton

No... I think it should be on jerrys prediction list...
On Mar 11, 2012 9:23 PM, Greg Morphis gmorp...@gmail.com wrote:


 Kinda off topic for this list, don't you think?
 On Mar 11, 2012 8:08 PM, Brian Thornton br...@cfdeveloper.com wrote:

 
  Have you guys seen this video...
  -- Forwarded message --
  From: Fred Day fs...@msn.com
  Date: Mar 11, 2012 9:06 PM
  Subject: kony2012
  To: Brian Thornton vegasthorn...@gmail.com
 
   http://www.youtube.com/watch?v=Y4MnpzG5Sqc
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350357
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Fwd: kony2012

2012-03-11 Thread Greg Morphis

OK, go back to spamming the cf-jobs list ;)
On Mar 11, 2012 8:43 PM, Brian Thornton br...@cfdeveloper.com wrote:


 No... I think it should be on jerrys prediction list...
 On Mar 11, 2012 9:23 PM, Greg Morphis gmorp...@gmail.com wrote:

 
  Kinda off topic for this list, don't you think?
  On Mar 11, 2012 8:08 PM, Brian Thornton br...@cfdeveloper.com wrote:
 
  
   Have you guys seen this video...
   -- Forwarded message --
   From: Fred Day fs...@msn.com
   Date: Mar 11, 2012 9:06 PM
   Subject: kony2012
   To: Brian Thornton vegasthorn...@gmail.com
  
http://www.youtube.com/watch?v=Y4MnpzG5Sqc
  
  
  
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350358
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: kony2012

2012-03-11 Thread Michael Stemle

I don't think this is a good place to discuss this, especially since the
people local to that area are now opposing this whole movement. I don't
believe the people involved in this movement have properly grasped the
complexity of this issue - especially the racial aspects - and I don't
think it is possible for us to have an honest and appropriate discussion
about this here. I would prefer not receive messages designed to take the
United States to war... or of any other political sway.

On Sun, Mar 11, 2012 at 20:07, Brian Thornton br...@cfdeveloper.com wrote:


 Have you guys seen this video...
 -- Forwarded message --
 From: Fred Day fs...@msn.com
 Date: Mar 11, 2012 9:06 PM
 Subject: kony2012
 To: Brian Thornton vegasthorn...@gmail.com

  http://www.youtube.com/watch?v=Y4MnpzG5Sqc


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350359
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: kony2012

2012-03-11 Thread Gerald Guido

 I don't think this is a good place to discuss this

+1000

It is rather controversial, and in my opinion suspect at best.

https://www.google.com/search?ix=sebsourceid=chromeie=UTF-8q=kony2012

Let the internets hash it out.

G!

On Sun, Mar 11, 2012 at 9:54 PM, Michael Stemle themanchic...@gmail.comwrote:

 I don't think this is a good place to discuss this, e




-- 
Gerald Guido
http://www.myinternetisbroken.com


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350360
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Fwd: kony2012

2012-03-11 Thread Eric Roberts

You posted to cf-talk...not cf-community Brian...

-Original Message-
From: Brian Thornton [mailto:br...@cfdeveloper.com] 
Sent: Sunday, March 11, 2012 8:44 PM
To: cf-talk
Subject: Re: Fwd: kony2012


No... I think it should be on jerrys prediction list...
On Mar 11, 2012 9:23 PM, Greg Morphis gmorp...@gmail.com wrote:


 Kinda off topic for this list, don't you think?
 On Mar 11, 2012 8:08 PM, Brian Thornton br...@cfdeveloper.com wrote:

 
  Have you guys seen this video...
  -- Forwarded message --
  From: Fred Day fs...@msn.com
  Date: Mar 11, 2012 9:06 PM
  Subject: kony2012
  To: Brian Thornton vegasthorn...@gmail.com
 
   http://www.youtube.com/watch?v=Y4MnpzG5Sqc
 
 
 

 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm