ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old November 22nd, 2004, 05:39 PM
shawnbecker shawnbecker is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 3 shawnbecker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Trouble with dsn less conection

Well I'm new at this DSN Less connection thing with coldfusion Mx I can get it to work when I use it in a static sense Like a static SQL statment but I want to use it with conditional logic. This is just the latest way I've tried to do it, and it doesn't work. I've also tried to run the st.exectute query directly on the SQL logic but it doesn't like the conditional logic and won't work. I'm a newbie at this part of Coldfusion and would apprectiate any help you can give me Thanks.


Latest attempt
<cfscript>
class = createObject("java", "java.lang.Class");
class.forName("org.gjt.mm.mysql.Driver");
dm = createObject("java","java.sql.DriverManager");
con = dm.getConnection("jdbc:mysql://12.000.000.000:3306/Database","xxxxx","0000000");
st = con.createStatement();

</cfscript>
<cfquery name="getcalloutcomeoptions" datasource="con">
Select * From calloutcome
where SurveyID = <cfqueryparam value="#SurveyID#" cfsqltype="cf_sql_integer">
<cfif SpawnQuestion is "False">
and WhenToShow ="ALL"
</cfif>
<cfif SpawnQuestion is "End">
and WhenToShow ="End"
</cfif>
<cfif spawnQuestion is "True">
and WhenToShow <>"End"
</cfif>
</cfquery>


This way works in a seperate query but doesn't suit my needs in constructing dynamic sql statements

<cfset UpdateCallBack = st.executeQuery("UPDATE survey
SET
CallBackDay='#Day#',
CallBackStartTime='#BeginTime#',
CallBackEndTime='#EndTime#',
Name='#Name#'
WHERE ID = #ID#")>

Reply With Quote
  #2  
Old November 22nd, 2004, 06:12 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
I've never used DSN-less connections in CFMX, so my advice would be save yourself a ton of pain and just create a datasource.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old November 22nd, 2004, 06:19 PM
shawnbecker shawnbecker is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 3 shawnbecker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Well, I would do that. But my hosting company has limits on the amount of database space they give me. So if I can figure this out. I can run the database from a different server.They don't offer a mechanism for setting up a database external to there hosted databases. if I can't figure out a way of doing it I guess I'll just have to pay them more for database storage.

Reply With Quote
  #4  
Old November 22nd, 2004, 06:39 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,488 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 18 h 10 m 11 sec
Reputation Power: 42
Well for one, what you're doing is, I'm sure, totally violating any agreements that you approved when you signed up for hosting. Second, if I understand you correctly, then you want to try and connect your CFMX applications at one host to a MySQL database running at some other host or at your home. The performance for this datasource will be absolutely terrible due to the number of hops between the host and the other database server. And third, given how difficult it's going to be to hack around this I'd have to think that paying for some more space or trimming what you already have down to make more room would be way, way easier! Good luck.

Reply With Quote
  #5  
Old November 22nd, 2004, 06:45 PM
shawnbecker shawnbecker is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 3 shawnbecker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I know you're probably right. But the geek in me wants to figure it out.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Trouble with dsn less conection


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway