Solved

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

Posted on 2007-11-20
23
156 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 52

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 52

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
 
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 52

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 52

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
Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

 
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 52

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 52

Expert Comment

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

Accepted Solution

by:
_agx_ earned 425 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 52

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 52

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

707 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now