-5

I'm doing a simple app in loopback 4, the app connects a SQL Server, I have a table very simple, it has a 3 columns, when when I execute the app I write in console the command "npm start" and I verify in the browser whit the url http://localhost:3000/explorer/ I select the method Get, it appear a error 500, then I check the console and it appears the message "500 RequestError: Invalid column name 'string' " I understand that the app is searching a column in the table with the name "string" but I didn't define that name. I hope that someone cans help me, thanks.

enter image description here enter image description here

Andy
  • 49,085
  • 60
  • 166
  • 233
Abraxas
  • 93
  • 5
  • 4
    Images of code, and errors, don't help us help you. Code and errors are text and should be provided as `text`. Those images, however, don't even appear to include the code you're running, meaning any answers would be guesses as well. – Thom A Apr 30 '20 at 16:46
  • 3
    We only need the part of the code that produces the error, or enough for an [mre], not the whole lot. As for *"it is what i can provide you"* pasting `text` is far easier than pasting images. Give us something we can use. – Thom A Apr 30 '20 at 17:16
  • 2
    Errors expose line numbers, etc. You need to look at your errors (which are *still* imagess, so useless to us) and then post the inforamtion related to those errors. – Thom A Apr 30 '20 at 17:46
  • 2
    *"I added the images so that the example was more illustrative"* images are *far* worse than posting the actual text. Future readers can't search in text in images, we can't copy and paste said error, we have to try to read small text that when we zoom in looks awful. If you aren't going to take the time to post the errors and text, and your code that is causes the error, how do you think we can help you? What you're doing is akin to asking a mechanic to explain to you how to fix your car, but all you tell him is "it doesn't start". That's it. – Thom A Apr 30 '20 at 18:00
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/212890/discussion-between-abraxas-and-larnu). – Abraxas Apr 30 '20 at 22:31
  • 7
    Please don't make more work for others by vandalizing your posts. By posting on the Stack Exchange (SE) network, you've granted a non-revocable right, under a [CC BY-SA license](//creativecommons.org/licenses/by-sa/4.0), for SE to distribute the content (i.e. regardless of your future choices). By SE policy, the non-vandalized version is distributed. Thus, any vandalism will be reverted. Please see: [How does deleting work? …](//meta.stackexchange.com/q/5221). If permitted to delete, there's a "delete" button below the post, on the left, but it's only in browsers, not the mobile app. – Makyen May 04 '20 at 19:17

1 Answers1

1

Please look at the order query. You send column string to order your result. I think you have no column definition for string column Name. Try with the most obvious order (id) and it will work.

Your query

farojos
  • 46
  • 2
  • thanks for your commet, efectibly in the browser whe I clik in the button "try it out" and I replace the word "string" by "id", the query is execute correctly – Abraxas May 01 '20 at 23:34
  • "offset": 0, "limit": 100, "skip": 0, "order": [ "id" ] – Abraxas May 01 '20 at 23:34