I’m trying to test (before purchasing the Enterprise version) a simple connection to a SQL database with the Coldfusion connector so that I can display and edit a query result in a dhtmlxgrid.
I’ve searched through all the documentation and the forums and all I can find are pieces, but no step by step instructions of how the connector should be set up to connect to MSSQL (not MySQL).
I found this code, for example:
<cfset grid = createObject(“component”,“dhtmlXConnectors.GridConnector”).init(“database_name”,“MySQL”)>
I changed database_name to the one I use (“concerts”), and instead of MySQL I couldn’t find any support documentation, so I put “MSSQL” instead.
Following that line of code I have:
<cfset grid.render_table(“tblSpecialNotes”,“specialNoteID”,“specialNoteStartDate,SpecialNoteExpireDate”)>
where “tblSpecialNnotes” is the table in the database I am querying, and the remaining parameters after that represent a few of the columns in the table I want to display. My test.cfm page is blank, although a “View Source” shows an XML file with lots of CDATA and "row id=‘1’, etc (but no data from my table).
Can someone please provide a very simple, yet complete from to example of how to use the Coldfusion connector to connect to a MS-SQL database and render a grid with a few columns, and insert & delete row capability?
Here’s the code I have:
<cfset grid = createObject(“component”,“dhtmlXConnectors.GridConnector”).init(“concerts”,“MSSQL”)>
<cfset grid.render_table(“tblSpecialNotes”,“specialNoteID”,“specialNoteStartDate,SpecialNoteExpireDate”)>
Any help would be very much appreciated. Thanks!