It's UWAweek 42 (2nd semester, week 12)

help1402

This forum is provided to promote discussion amongst students enrolled in CITS1402 Relational Database Management Systems.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying the 6 articles in this topic
Showing 6 of 612 articles.
Currently 11 other people reading this forum.


 UWA week 42 (2nd semester, week 12) ↓
SVG not supported

Login to reply

👍?
helpful
9:32am Tue 15th Oct, ANONYMOUS

i have encountered error Lab5 , question 3. Error is "Unexpected sqlite3 error: Error: near line 17: Cannot delete pos record with associated po_items" my total line is 12 lines, also my local database was working with the same query. i dont know what to do


SVG not supported

Login to reply

👍?
helpful
9:45am Tue 15th Oct, ANONYMOUS

i added full stop, but still same error


SVG not supported

Login to reply

👍?
helpful
11:58am Tue 15th Oct, ANONYMOUS

This is because of the format of the SQLite query. I found that the error must near line 12, as the error has been specified in the excepted answer.


SVG not supported

Login to reply

👍?
helpful
8:19pm Tue 15th Oct, Adam W.

This may be due to the way the question is checking for the expected output, also remember it is checking to make sure that the records cant be deleted, if there are any issues with line numbers, you can try remove any blank lines in your code. I'll look into this to see if there is an issue with the question though. ANONYMOUS wrote:
> i have encountered error Lab5 , question 3. > > Error is "Unexpected sqlite3 error: Error: near line 17: Cannot delete pos record with associated po_items" > > > my total line is 12 lines, also my local database was working with the same query. > > i dont know what to do


SVG not supported

Login to reply

👍?
helpful
8:36pm Tue 15th Oct, Adam W.

The issue should be fixed, removing any reference to line numbers, you should now get: Trigger failed as expected due to related po_items: Cannot delete pos record with associated po_items job_id po_id po_date vendor_id ---------- ---------- ---------- ---------- 002 HHH 1990-06-20 ABC The Python code in the question was not correctly identifying the error message and intercepting it.


SVG not supported

Login to reply

👍?
helpful
4:54pm Wed 16th Oct, Adam W.

I just had a student come to the support session showing that there was still issues with the way the question was checked, and if your instance of the quiz is for some reason using an older version of the question, and does not have the same error message as above (Trigger failed as expected due to related po_items: Cannot delete pos record with associated po_items), but rather has line numbers referenced, but that is the only issue, then i can suggest that you try to adjust the number of lines the trigger takes up, e.g. is the error message displayed compared to the expected is 4 lines off, then shorten the size of the query you submit by 4. you can safely do this by having lines of code that you would normally separate for better visibility all on one line e.g. SELECT * FROM STUDENTS; instead of SELECT * FROM STUDENTS; SQL will ignore the majority of whitespace anyway, and it is primarily for readability and separating the commands.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy