Error when previewing new table in aggregate

Error when previewing new table in aggregate

  

Hi All - I'm getting a "We're sorry but there was a problem obtaining preview data - Database returned the following error 'Invalid Object Name 'Locations'"

Existing tables in DB are OK.

This now happens when I add a table in SQLSMSExpress and add it to an extension in Integration Studio that I then publish. When I try and add the table to an aggregate, this is when I get the error while it is fetching data to preview. It also happens on a 'TestTable' I create with just one primary key ID and 1 text field. I haven't changed much recently, just reinstated my personal environment after a long break and upgraded development studio (Though I got this error on my previous version 10.0.814) Also my personal environment has been upgraded by Outsystems.

Finally, this is the error report in the monitoring section of the environment when I run my application. 


d031fd8-049e-4bbb-881f-c50854dc38db
Time of Log:
2018-07-20 13:00:17
eSpace:
Central
Tenant:
Users
User:

Session Id:
nz55zfijfumcvi2ta0kxdslb
Server:
S3Y1D-LT52CC
Module:

Message:


Error executing query.


Environment InformationeSpaceVer: 9 (Id=80, PubId=81, CompiledWith=10.0.816.0)
RequestUrl: https://apollomis.outsystemscloud.com/Central/Dashboard.aspx?id=ly99bIo8ftdhNYoup5V0Uodffz1JKurWKaXWtdgGpuQ=~Bx/9cgOy85Al/F2LU3EwKGTFvf+jYTB8YKSocAL+XAdZolNEt2UoFLOkM2tV/bUtCJAGvPuewGhf/Ui7TJvjSQ== (Method: GET)
FilePath: C:\OutSystems\Sandboxes\ATXSGR044\Platform Server\running\Central\Dashboard.aspx
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 54928 ('w3wp', Started='7/19/2018 2:21:07 AM', Priv=745Mb, Virt=18268Mb)
TID: 21
Thread Name:
.NET: 4.0.30319.42000
Stack:
[1] Error executing query.
   at ssCentral.Flows.FlowMainFlow.ScrnDashboard.FuncssPreparation.datasetGetLocationsBySchoolID(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount)
   at ssCentral.Flows.FlowMainFlow.ScrnDashboard.Preparation(HeContext heContext)
   at ssCentral.Flows.FlowMainFlow.ScrnDashboard.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

[2] Invalid object name 'Locations'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at OutSystems.HubEdition.DatabaseProvider.SqlServer.ExecutionService.ExecutionService.ExecuteReader(IDbCommand cmd)
   at #Ylb.#7lb.ExecuteReader(String description, Boolean isApplication, Boolean transformParameters, Boolean skipLog)
   at OutSystems.Internal.Db.DatabaseAccessProvider`1.ExecuteQuery[T](Command cmd, GenericRecordList`1 rl, String description, Boolean transformParameters, Boolean skipLog)
   at ssCentral.Flows.FlowMainFlow.ScrnDashboard.FuncssPreparation.datasetGetLocationsBySchoolID(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount)

Hi Andrew,

Check that your connection to the database still works.

Go to Service center, in Administration, in Database Connections and check that the connection is working and that that is the one you want to use in your applications. 

Also, the extension that you created should be listed in the bottom of page for that connection (in Service Center).

Cheers,

José


Hi José,

The connection is working OK in Database Connections, and extension is listed at the bottom "SchoolConnector". The only thing that might be a problem is that I used a different Logical Database Name on some of the tables in the extension and published/configured the new logical database to the same extension "SchoolConnector". After I realized my error I removed the tables from the extension and added them again by "Connect to External Table or View". This worked OK and I then republished my extension. However, I now get the error as mentioned in my original post.

Thanks,

Andy.

Solution

Whoh! Just fixed it - All I did was retest and resave the connection info in Database Connections, and this appears to have completely fixed the problem :-) 

Thanks for pointing me in the right direction,

Andy.

Solution