I'm attempting to test out creating/updating datasources with the cfadmin tag and the updateDatasource action.
When I attempt to rename a datasource, it updates correctly but then when I try to run a query right after the datasource is changed any table I try and call a query against is returned "Invalid Object name".
<cfadmin action="updateDatasource" type="server" password="LUCEE_PW" classname="com.microsoft.jdbc.sqlserver.SQLServerDriver" dsn="jdbc:sqlserver://{host}:{port}" name="demolab8" newname="demolab8" host="HOST_NAME" database="demolab8" port="1433" dbusername="demolab8" dbpassword="DB_PW" connectionLimit="300" connectionTimeout="20" blob="false" clob="false" allowed_select="true" allowed_insert="true" allowed_update="true" allowed_delete="true" allowed_alter="true" allowed_drop="true" allowed_revoke="false" allowed_create="true" allowed_grant="true" custom="DATABASENAME=demolab8&sendStringParametersAsUnicode=true&SelectMethod=direct">
After the above script is run and after I get the error, if I try and validate the connection from Server Admin, it validates successfully. I can see the table exists in the database.
If I delete the datasource prior to running the updateDatasource script, I still receive the same error. However, if I delete the datasource and create the datasource using the Admin interface (using same info from updateDatasource), then the queries start working correctly.
I'm puzzled why the script doesn't work, but the interface does.
Thanks,
Adam De Lay