Skip to main content
paulm1677332
Inspiring
November 13, 2020
Question

setMSSQL question

  • November 13, 2020
  • 1 reply
  • 604 views

Hi,

 

Would anyone know why datasources created using setMSSQL aren't showing in CF Admin Datasource screen? They show when I call getdatasources() in a script but not in Coldfusion Administrator.
 
Thanks
This topic has been closed for replies.

1 reply

Charlie Arehart
Community Expert
Community Expert
November 13, 2020

Are you sure you're looking at the cf admin of the instance where the code is running (to create the dsn via that admin api call, and to view it with that other call)?

 

For instance, you could either have multiple instances of cf (if you or someone else created them), or even on your own machine, you could have cf installed both on its own (admin at port 8500, by default) AND as implemented within cfbuilder (port 8600, by default).

 

Besides checking what port you're using, do also a cfump of the server scope, in the template showing the dsns via code, which will confirm where that code is running. Compare that to what's in the cf admin  settings summary page.

 

Let us know how it goes. 

/Charlie (troubleshooter, carehart. org)
paulm1677332
Inspiring
November 13, 2020

Hi Charlie,

 

Thanks for that. Everything was default with only one instance running. I did a restart of the Coldfusion Application server and the new ones appeared then. I should've thought to have done that previously. I suppose what confused me was when you add them via the interface in CF Admin they appear immediately and I was expecting the same to happen here. The next question would be is there a way I could get them to show without having to restart the server.

 

Paul

Charlie Arehart
Community Expert
Community Expert
November 13, 2020

That's interesting to hear. I am not aware that the admin API calls like that would NOT take effect (appearing in the CF Admin) until a restart, but I suppose it's possible. It's just odd that clearly CF the ENGINE knows about the change, immediately, because you could see it with other code on that server. I would not expect you should HAVE to restart the CF Admin to see it in there, no.

 

FWIW, you haven't said what version of CF you are on, or what update. If you are not yet on the latest CF updates (10 for CF2018, 16 for CF2016) or on a still older CF version, perhaps this was a problem in the past that has since been fixed. If you ARE on the latest CF update, that would indeed be odd.  

 

In that case, it could be interesting to hear if others may get to try this out to see if other settings (set via the Admin API) may not "appear" in the CF admin immediately, and until a restart. I'm afraid I'm not in a position to test this as I write, and I may not get to it, but I put this out in case you or others may be interested to dig further.

 

If it is happening in the latest CF versions, it would be something you should report as a bug at tracker.adobe.com. Adobe really does pay attention to those. They don't fix EVERY bug, but they do fix a few hundreds per year.

/Charlie (troubleshooter, carehart. org)