House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

manually create query

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
hi,
Richard White
02/01/08 09:07 A
excellent, thanks dominic
Richard White
02/01/08 09:20 A
thanks sonny these look very interesting
Richard White
02/01/08 10:27 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Richard White
02/01/2008 09:07 AM

hi, just wondering if there is a way to manually create a query. i have a tag that changes everything in an ms excel document to a query. i then run code through the query to manipulate the data. we have recently found a major floor in the tag and have now changed to jexcel. the problem is we dont want to change all of our code that manipulates the query therefore we simply want to use jexcel code to get the data out of excel and then populate it into a query, then the rest of the code can continue as normal. i am sure i have seen someone do this before but cannot find where. if this is possible does anyone know of any good tutorials thanks very much richard  

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dominic Watson
02/01/2008 09:14 AM

> just wondering if there is a way to manually create a query. You need the following three cf functions, the livedocs should tell you all you need to know about them: QueryNew() QueryAddRow() QuerySetCell() Dominic -- Blog it up: http://fusion.dominicwatson.co.uk

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Richard White
02/01/2008 10:27 AM

thanks sonny these look very interesting richard > You'd probably find these examples helpful as well: > http://www.bennadel. com/blog/204-Using-ColdF> usion-Query-s-Underlying-Java-Methods-For-Query-Manipulation-And-Logic. > htm > http://www.bennadel. com/blo> g/200-ColdFusion-CFHttp-To-Query-Much-Faster-Than-Java-Buffered-Reader. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
s. isaac dealey
02/01/2008 03:38 PM

> You need the following three cf functions, the livedocs should tell > you all you need to know about them: > > QueryNew() > QueryAddRow() > QuerySetCell() Usually yeah, although occasionally for small queries, this is a little cleaner: QueryNew() QueryAddColumn() ListToArray() - sort of optional <cfscript>   qry = QueryNew("");   QueryAddColumn(qry,"c1",ListToArray("1,2,3"));   QueryAddColumn(qry,"c2",ListToArray("a,b,c"));   QueryAddColumn(qry,"c3",ListToArray("x,y,z")); </cfscript> just for comparison, the more common approach for the same query would look like this: <cfscript> qry = QueryNew("c1,c2,c3"); QueryAddRow(qry,3); QuerySetCell("c1",1,1); QuerySetCell("c2","a",1); QuerySetCell("c3","x",1); QuerySetCell("c1",2,2); QuerySetCell("c2","b",2); QuerySetCell("c3","y",2); QuerySetCell("c1",3,3); QuerySetCell("c2","c",3); QuerySetCell("c3","z",3); </cfscript> hth, ike -- s. isaac dealey  ^  new epoch isn't it time for a change?      ph: 503.236.3691 http://onTap.riaforge.org/blog


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

October 23, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference