Mason B
06/13/2022, 8:03 PMmockQuery = mockBox.querySim("id,fname,lname
1 | luis | majano
2 | joe | louis
3 | bob | lainez");
And using my companies code to change the column "fname" to "firstname", but I am unsure how to check the new column name.
I am just an intern so all of this is very new to me so please let me know if there is more/better info I can provide πScott Steinbeck
06/13/2022, 8:07 PMfname as firstname
from a DB Query. Can you expand on the goal of your test?Mason B
06/13/2022, 8:10 PMScott Steinbeck
06/13/2022, 8:11 PMALTER TABLE
statement?Mason B
06/13/2022, 8:12 PMScott Steinbeck
06/13/2022, 8:16 PMselect * from table
) . then you can use a query.columnlist
on the result to compare the column names to verify the change happened.Scott Steinbeck
06/13/2022, 8:18 PMMason B
06/13/2022, 8:19 PMqueryexecute
very similar to what is used in some other scripts we have. I get the error: Error: datasource [name] does not exist
Scott Steinbeck
06/13/2022, 8:20 PMApplication.cfc
in the testbox directory that is being referenced instead of the one in the root of your project.Mason B
06/13/2022, 8:22 PMthis.name this.sessionmanagement and this.mapings
. Does not seem to be doing a whole lot thenScott Steinbeck
06/13/2022, 8:23 PMthis.defaultDatasource = "your datasource name here";
to the applicaiton.cfcScott Steinbeck
06/13/2022, 8:23 PMqueryExecute
without specifically setting the datasource in the optionsScott Steinbeck
06/13/2022, 8:24 PMqryResult = queryExecute("SELECT * FROM Employees", {}, {datasource="myDataSourceName"});
Mason B
06/13/2022, 8:24 PMMason B
06/13/2022, 8:24 PMScott Steinbeck
06/13/2022, 8:26 PMapplication.cfc
rather than via the server settings or cfconfig. In which case you would need to copy that over into your testbox application.cfcMason B
06/13/2022, 8:28 PMMason B
06/13/2022, 8:36 PMqueryexecute
and still get told the datasource doesn't exist. In our main Application.cfc we set the default datasource the same way I was trying here: this.defaultDatasource = "datasource name";
Adam Cameron
Adam Cameron
Mason B
06/13/2022, 10:34 PM