473,672 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Foreign key constraint error when using MySQL running under Windows 7

1 New Member
I'm getting a foreign key constraint error when I use MySQL running under Windows 7. When I run the same MySQL and Hybernate code on Mac it works just fine. Here are the details of the error:

09:48:40,765 ERROR JDBCExceptionRe porter:101 - Cannot add or update a child row: a foreign key constraint fails (`ff`.`continge ncy`, CONSTRAINT `FK1F21462F6543 0969` FOREIGN KEY (`EEC_ID`) REFERENCES `event` (`EEC_ID`))
09:48:40,766 ERROR AbstractFlushin gEventListener: 324 - Could not synchronize database state with session
org.hibernate.e xception.Constr aintViolationEx ception: Could not execute JDBC batch update

I already tried simple solutions like:
SET FOREIGN_KEY_CHE CKS = 0;

Do you know what might be different between Windows 7 and Mac OS MySQL which might be causing this problem?

Thanks.
Aug 11 '10 #1
1 2258
Atli
5,058 Recognized Expert Expert
I don't know about Mac OS, but I've had trouble switching from Unix to Windows because of the difference in how they treat file names. In Windows (NTFS) all file names are case-insensitive. In most Unix file-system, on the other hand, file names are case-sensitive.

Table names inside MySQL reflect this. They share names with the files/folders that store the data. So if you name your table "event", a query that referenced it as "Event" would work on Windows but fail on Unix.

That would be my best guess, in any case. If this is not the problem, post details about your database and the actual query you are executing and we might be able to spot the real problem.
Aug 11 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1745
by: Terminal882003 | last post by:
Hi, I have a problem in my application(C#) if I using RichTextBox to continuously display a series of text messages (using method AppendText()). When application is running, it will stop at some point (randomly), the error message is: ********************************* System.NullReferenceException: Object reference not set to an instance of an object.
1
426
by: Dermot O'Loughlin | last post by:
Can anyone help me with this? I get the following error when using the odbc adapter wizard in VS.Net 2003: --------------------------- Wizard Form --------------------------- An unexpected error has occurred.
0
2140
by: nthpixel | last post by:
Hey Folks, I am getting the following errors when I try to connect to my db with the MySqlConnection. I added MySql.Data to my Reference list and have the .dll in my bin directory. I also have "using MySql.Data.MySqlClient;". I know it's not my connection string because it works when I use an OdbcConnection. The error points to this line: MySqlConnection conn = new MySqlConnection(ConnString);
0
1557
by: Charlie | last post by:
Hi: I get a TreeNode binding error when using Data property of XmlDataSource control. When I switch to TextFile property and point to xml file on hard drive, problem goes anyway. I'm initializing Data property with xml string that matches file exactly. Seems to be problem with binding because if I remove bindings, tree works both ways. I'm binding on server like so... TreeNodeBinding bind = new TreeNodeBinding(); bind.DataMember =...
14
2888
by: Ben | last post by:
I don't know whether anyone can help, but I have an odd problem. I have a PSP (Spyce) script that makes many calls to populate a database. They all work without any problem except for one statement. I first connect to the database... self.con = MySQLdb.connect(user=username, passwd =password) self.cursor = self.con.cursor() self.cursor.execute("SET max_error_count=0")
0
1443
by: =?Utf-8?B?TG93bGFuZGVy?= | last post by:
Hello, I've built a web application that uses client script callbacks. It is used on a large network with a large variety of user OSes and IE versions. It was tested on IE 6 on different setups and IE 5.5 to a lesser degree without problems. I know of a least one user who gets an error in WebResource.axd when using the application. The same error also occurs on a simple reproduction page with just a button and a div. When the button...
4
2275
by: antpal | last post by:
I am not sure exactly what i am doing run but when I run this code in sql plus i get constraint error on most of my tables except author and books table. Please help I am new to Programming in PL/SQL. --Create All Tables CREATE TABLE authors ( auth_id NUMBER(7), f_name VARCHAR2(30), l_name VARCHAR2(50),
8
4011
by: msnews.microsoft.com | last post by:
Our IT team relocated our application servers yesterday. They had to take one machine out of the cluster because it would prompt users for credentials if accessed using the IP address, which I guess is what happens when it is accessed through the firewall. However, it works as expected when I use the machine name in place of the IP address. To summarize, the application servers were moved to a new hosting site and one machine is...
7
2857
by: svsenthilkumar | last post by:
Hai, I got an javascript error when using ajax in mozilla browser, anyone help me why the error is coming, meaning for this error and how can i rectify this error. Error: " nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: (here url)
1
1985
by: bolineni | last post by:
Do i need to insatall any softwares when i am running windows mobile app in Palm tungsten E2(new) device.just i installed cd which is i got with device and synchronized with HotSync. Pls Give an idea how to run the windows mobile app in palm OS device. Thanks
0
8486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8828
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8680
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4418
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.