Database error code -177

Discuss the database features
Post Reply
Uiop541
Posts: 2
Joined: Wed May 25, 2016 5:18 am

Database error code -177

Post by Uiop541 »

Working on an online school project with database and I need to finish this class ASAP and I was wondering if any of you could help me with this error message I'm getting?
Attachments
Community Service.odb
Actual File
(32.29 KiB) Downloaded 163 times
Picture of Error Message
Picture of Error Message
OpenOffice 4 on Windows 10
FJCC
Moderator
Posts: 9626
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Help ASAP Database error code -177

Post by FJCC »

What are the column types of Organizations.OrganizationName and VolunteerHours.OrganizationName? They should be the same type. You can check the type by going to the table pane, right clicking on the table icon and selecting Edit.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
Uiop541
Posts: 2
Joined: Wed May 25, 2016 5:18 am

Re: Help ASAP Database error code -177

Post by Uiop541 »

They appear to be the same?
Attachments
Untitled.png
OpenOffice 4 on Windows 10
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Help ASAP Database error code -177

Post by eremmel »

There are more aspects that define a type than only the keyword 'VARCHAR', The type of a text field is 'VARCHAR(N)' with N the max expected length in characters. Now rethink your relation definition....
In theory you can only make a relation between from fields f1 to f2 that have the types VARCHAR(n1) and VARCHAR(n2) when n1 < n2, but I will not be surprised that the constrain is even more restricted to: n1 == n2.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
UnklDonald418
Volunteer
Posts: 1573
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Help ASAP Database error code -177

Post by UnklDonald418 »

I downloaded your “Community Service.obd” in your post
In your "Organizations" table "OrganizationName" is type [VARCHAR IGNORE CASE]
In your "Volunteer Hours" table the foreign key "OrganizationName" is type [VARCHAR]. While similar they are still different types.
By the way even after changing them to matching types you may need to re-enter your data in that column of the "Volunteer Hours" table before it will work.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply