Username:
Password:
ColdFusion MX 7 Advanced Tutorials

Introducing Dreamweaver / Setup a Data Source

Subtitles of the Movie

In this movie, we're going to set up the data source for our database and a data source allows you to store the driver and the path to the database. You store that information and register it within the ColdFusion administrator. So I'm in the application panel and I'm in the databases tab. I will move this over a little bit. If you have a page closed, you'll see the tab is grayed out, so just go ahead and open a new ColdFusion page and it will now become active. So what we're going to do is click this little button here that says modify data sources. It's got the little pencil on it in the databases tab. Now, what this does is bring us out to the ColdFusion administrator, specifically the data sources area. So you'll see in the regular administrator we have all those categories on the left-hand side; notice those are gone if you go to the data source area through Dreamweaver. You can also go straight to the CF admin area if you prefer to do so. Ok. So the first thing we need to do in our data source area is give our data source a name. So I'm going to name it SUMA advanced and the driver we're going to be using is the Microsoft Access with Unicode. I tend to have better luck using it with Unicode than the basic driver. So we'll go ahead and click add and I like to show this happening to save you the trouble of having to do it, but remember in the administrator, red means stop. So I need to stop and read this. Trying to create a data source with a name that's not valid. You can not have spaces in your names, so I will do this again without a space in the name. We'll go back down to Access with Unicode. I like to show that so you don't have to worry about it and I will click add. That moves us into our database file area and we need to tell ColdFusion where is our database located? What's the path to it? So we'll click the browse server button and this will move me out into a little Java applet. If for some reason you can not get into this interface, it may be because you don't have the J2EE runtime environment installed on your machine. So it is something you will want to do. You can just type the path in as well. You don't have to use this little feature. I just think it's kind of nice. So I'm going to go into same place we've been going C, CFusion MX7, go down to wwwroot and go down to SUMA and when we installed the class files, included in that was your database. The joys of an Access database is you can copy and paste like this. So the SUMAdatabase.mdb is what we want to choose inside the SUMA folder. So click apply. I'll show you the path again in just a minute. Here we are. So CFusion MX7, wwwroot, SUMA and our SUMA database. So I'm going to click submit. We have the green light here. Our data source has been added down below so we are set. So we can go back to Dreamweaver. Another thing you want to watch for is that the status is OK down at the bottom right here. I'll close out of that. Notice when I go back to Dreamweaver, my database is not showing. This does not auto-refresh so you will need to click the refresh button. Here is my SUMA advanced database and here are the various tables inside the database. So we are now set, our data source has been set up so we can access our database directly through Dreamweaver.

Tutorial Information

Course: ColdFusion MX 7 Advanced
Author: Candyce Mairs
SKU: 33828
ISBN: 1-934743-34-8
Release Date: 2007-11-30
Duration: 6 hrs / 89 lessons
Work Files: Yes
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available