I'm not very clear on this var thing in as much as <cfset Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")> works, but <cfset var Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")> throws the error: You cannot use a variable reference with "." operators in this context
hence some vars are not scoped locally. Yes, I can convert it into a cfquery object, and a lot of the time I will, but I also want to be able to insert the data into another table in another db which I can do directly rather than converting it to a query first. Hence the reason to split it into separate methods. Sage line 100 is an ancient beast and I would use a normal cf datasource if I could, but it doesn't work in cf8 hence the reason for doing it manually, which does. Regards Richard > -----Original Message----- > From: C S [mailto:[EMAIL PROTECTED] > Sent: 30 April 2008 14:08 > To: CF-Talk > Subject: Re: closing JDBC recordsets > > >Actually, to answer my own question, I think that if I call > the close() > >method for the passed JDBC recordset after I've done with > using it in > >other methods then this should do the trick. Am I right? > > >Actually, to answer my own question, I think that if I call > the close() > >method for the passed JDBC recordset after I've done with > using it in > >other methods then this should do the trick. Am I right? > > I would consider converting the resultset into a CF query > object, and returning a query from the function instead. > Also check your function local variables. I do not think all > of them are properly VAR scoped. > > BTW, are you connecting using a datasource or making a direct > connection to a database? IIRC opening and closing database > connections manually can often be more expensive than using a > fixed datasource (with connection pooling enabled). When > connection pooling is enabled, queries just grab an already > open connection from the pool, rather than opening and > closing them each time a statement is executed. > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304491 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4