Ok, again, the Data Source has to be set up with ColdFusion itself. Think of it as something that has to be "registered" with ColdFusion, like something that would have to be set up in the php.ini file (except in ColdFusion, everything is set up in the nice web interface that the ColdFusion Administrator provides, and not some ridiculously long text file

).
One thing to realize is that the "Data Source" name is
not the same thing as your database's name (although you can be set it up that way if you like). A "Data Source" is an abstract concept that ColdFusion implements to encapsulate all of the connection details under one name. Think of it as an object employed by the ColdFusion engine:
Code:
class MyDatasource {
String databaseLocation = "localhost";
String databaseName = "myDatabase";
String username = "myUsername";
String password = "myPassword";
Driver driver = (SQL Server Driver);
}
That's why only one "datasource" name is ever needed when querying your database.
Code:
<cfquery name="getMyData" datasource="MyDatasource">
SELECT * FROM myTable
</cfquery>
ColdFusion Data Sources are a different paradigm for accessing databases than employed in other languages, but one with many benefits. Think about if you had to switch your database in php from mysql to sql server. You would enjoy changing hundreds of mysql_xxx function calls to m
ssql_xxx function calls, and dealing with annoying inconsistencies such as if you used the
mysql_affected_rows() function in a bunch of places, when the mssql counterpart is
mssql_rows_affected(). Talk about a real pain in the you-know-what. ColdFusion provides a consistent interface for querying, regardless of the backend database engine being used. Data Sources are the layer of abstraction which makes that possible.
I believe these are the steps that you'll need to follow for your hosting provider to set up a Data Source, assuming that you are on a shared hosting plan:
http://www.networksolutions.com/supp...-windows-only/
For the
<cfquery> tag, the
username and
password attributes are only for a local override of the username/password that was set up for the Data Source. You won't need these attributes unless you need to use a different database user with specific permissions for a given query. Also, a virtual directory won't have anything to do with datasources.
Good luck buddy, and let me know how it goes!
-Greg