Viewing Category: Database  [clear category selection]

Data Manager by Steve Bryant

A couple of weeks ago at the Nashvile CFUG Steve Bryant presented on his Data Manager product. It is a set of CFCs that helps abstract your database layer, reducing the amount of SQL you have to write. It also has a nice feature known as Synchronize Database Structure. This allows you to generate an XML schema that represents your tables and fields. Using this, you can then easily load that schema into a new database. The new database does not have to be the same product either. For example, you can easily take the tables from a MS-SQL db and port the structure over to MySQL. It does not do the data itself, but Steve does have a separate tool for that purpose.

This morning I had a use for such table structure copying. I didn't have SQL admin access to just run a SQL file, but the CF Datasource priviledge can create tables. So I pointed Steve's Data Manager at my local db, which had the needed tables and generated the XML that represents those tables. Then I uploaded that XML to the server, used Data Manager's loadXML() function and it created the tables without a hitch (and in the blink of an eye, I might add).

Very nice Steve. You can see the presentation via a recorded Acrobat Connect Presentation (see link on NCFUG web site).

CFUG, Database  |  Send
Posted 3/4/07 @ 6:52 AM by Matt Williams

Database info for the Service CFC sample

Here is some info on the database included with the sample files from my previous blog entry.
I don't yet have any SQL scripts for MySQL or SQL Server, but for anyone who can't get into MS Access, here is the list of fields for each table. You can enter whatever data you would like, just be sure to put a date into the LastModifiedDate fields as I think it breaks without it.

PERSON TABLE:
PersonID - int, primary key, autonumber/increment
FirstName - varchar, 50
MiddleName - varchar, 50
LastName - varchar, 50
Gender - varchar, 2
YearOfBirth - int
Username - varchar, 50
Password - varchar, 50
LastModifiedDate - date/time

ADDRESS TABLE:
AddressID - int, primary key, autonumber/increment
PersonID - int
AddressType - varchar, 50
CompanyName - varchar, 50
JobTitle - varchar, 50
Department - varchar, 150
AddrLine1 - varchar, 150
AddrLine2 - varchar, 150
City - varchar, 50
State - varchar, 50
Country - varchar, 50
PostalCode - varchar, 50
Phone - varchar, 50
Fax - varchar, 50
Email - varchar, 150
LastModifiedDate - date/time

Database, OOP  |  Send
Posted 5/8/06 @ 6:02 AM by Matt Williams

ColdFusion MX - MS SQL - Resolving the dreaded SQLException while attempting to connect error

In trying to install CF Server and MS SQL for development on a laptop, I kept getting the following error.

"SQLException while attempting to connect: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect
[Macromedia][SQLServer JDBC Driver]Error establishing socket. Connection refused: connect"
I tried various security settings to no avail. Finally I tried a google search which led me to an entry on Robi Sen's blog from about a year ago who points to a SQL Server critical update tool from Microsoft. Thanks Robi. This fixed it for me.

Database  |  Send
Posted 4/16/06 @ 5:53 AM by Matt Williams