Solved

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

Posted on 2007-11-20
23
173 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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

Industry Leaders: 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!

Question has a verified solution.

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

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

705 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