Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Microsoft SQL Server Data Source Set Up On ColdFusion and How To Do It

Posted on 2007-11-20
23
Medium Priority
?
197 Views
Last Modified: 2013-12-24
I'm in the ColdFusion Administrator and it requires the following information to set up a data source for SQL...

CF Data Source Name
Database
Server
Username
Password
Description

The information I'm mostly unsure about is DATABASE, SERVER and DATA SOURCE and exactly where I get this information. I've tried the usual names and database name but for some reason it doesn't work.

This is the line in the summary window in SQL
ZYPHER\SQLEXPRESS (SQL Server 9.0.3042 - ZYPHER\HP_Administrator)

My Database name is...
SC  (short for shoppingcart)

password etc I'm sure I know if I can get into SQL management I must know it or is it different per database.
0
Comment
Question by:Ryan Bayne
  • 11
  • 9
  • 3
23 Comments
 
LVL 53

Expert Comment

by:_agx_
ID: 20325373
> for some reason it doesn't work

What settings did you use?

What error did you get?
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325379
OK Just realised I used 'Windows Authentication' for sign in. Its MySQL I use a password and user name for so at the moment I have no idea what they could even be!!!

Bumping up the points because I'm racing towards a university deadline and need this working lol

cheers
0
 
LVL 53

Expert Comment

by:_agx_
ID: 20325395
I don't know what else to tell you unless you can answer the questions above :-)

Good Luck
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325407
There's a datasource 'Summary' after you add the datasource. The summary is highlighted in orange and has error in the the far right column.

The page itself obviously results in  Data source SC could not be found. I've tried using numerous different settings but on first guess I used something like...

CF Data Source Name: SC
Database: SC
Server: localhost
Username: root
Password: ###########
Description: N/A

I considered Server being 9.0.3042
and username being ZYPHER

no luck however
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325414
lol I added my comment at same time as you qxl so that was just an update ;)

I gota say I've learned plenty from u guys I wish you I paid you my university tutor fee's!
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 20325449
>> Its MySQL

Is it MySQL or SQL 2005 that you are using?
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325460
SQL 2005
0
 
LVL 53

Expert Comment

by:_agx_
ID: 20325465
lol.  Timing is everything.

So you've created a database named SC.   Did you also create a sql server login named "root"?

For "Server" try either the IP address:  127.0.0.1  or  (localhost)  -- note the parenthesis around it
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325470
Missed a bit, Port is 1433! Which I get the feeling is not correct or is that ok.
0
 
LVL 53

Expert Comment

by:_agx_
ID: 20325475
The default port is _usually_ 1433, so that should be okay.
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325480
No I never set up any login at all, its login in through "Windows Authentication" which is what is confusing me on the password and user name situation
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325488
Tried my IP that is dislayed and your one 127.0.0.1  and local host neither work in the current settings!

And I also tried user name and password blank..surprise doesnt work lol
0
 
LVL 53

Expert Comment

by:_agx_
ID: 20325496
I don't normally use windows authentication, but I think you leave user/password blank for windows authentication.
0
 
LVL 53

Expert Comment

by:_agx_
ID: 20325499
What do you mean doesn't work?
0
 
LVL 53

Accepted Solution

by:
_agx_ earned 1700 total points
ID: 20325526
1) Have you enabled TCP/IP ?

2) Did you temporarily turn off any firewalls (they can prevent CF from connecting)

You might also want to look at these two articles
http://kb.adobe.com/selfservice/viewContent.do?externalId=kb400255&sliceId=1
http://www.mattwoodward.com/blog/index.cfm?commentID=211
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325586
Enabled TCP/IP where?

and nope no firewall changes
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325639
Well there has been a change in the ColdFusion error after doing what those pages said however the ColdFusion summary for datasource still shows error. I'm going to assume now it is a password and user name issue and probably another question because I set a user up and it doesnt work so I have no idea

Thanks for that
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20325642
Error Executing Database Query.
SQLException occurred in JDBCPool while attempting to connect, please check your username, password, URL, and other connectivity info.
 
The Error Occurred in C:\CFusionMX\wwwroot\SC2\Application.cfm: line 19

17 :             insert into Clients(int_CFID, txt_CFTOKEN)
18 :             values(#CFID#,'#cftoken#')
19 :     </cfquery>
20 :
21 :     <cfquery name="queryGetClientIDValue"
0
 
LVL 53

Expert Comment

by:_agx_
ID: 20325762
> however the ColdFusion summary for datasource still shows error.

What was that error message?  Its probably more accurate than the error you get from the query.
0
 
LVL 2

Author Comment

by:Ryan Bayne
ID: 20326021
I'm accepting this solution because the issue now is defining the correct password and username which in itself is another question as at no point during set up does it request a user name and so that leaves a beginner like me confused.

Thanks once again for your great help
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 20326349
>> No I never set up any login at all, its login in through "Windows Authentication" which is what is confusing me on the password and user name situation

When you log in under windows authentication it logs in under whatever using is running the process.

So you need to find out what that user is and add it as a login to SQL Server, then give it access to the database.
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 20326352
.. so what windows user is the internet server service running under? You need to add that windows user as a login and give it access to the database.
0
 
LVL 53

Expert Comment

by:_agx_
ID: 20330006
nmcdermaid is correct.  By default ColdFusion usually runs under the "system" account.  If that account does not have sufficient permissions, you can change it by going into control panel > services > click the Log On tab  . Then change the account ColdFusion runs under from "Local System Account" to whatever windows account you want.

Or you could add a sql server login and use sql server authentication that instead.  This assumes you've enabled "mixed mode" authentication.  Of course you would also need to enter the sql server user login/password in the datasource screen.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question