Im using microsoft sql server management studio to create my tables.
I previously had the relationships working but I have to go back an re-do them and it is throwing me an error:
im trying to do primary key 'person id' in person table with foreign key in holiday table 'person id'556
But when I try to save it I am getting the error:
- Unable to create relationship 'FK_Holidays_Person'.
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Holidays_Person". The conflict occurred in database "holidays", table "dbo.Person", column 'Id'.
any idea as to why it won't allow me to update this?
in my application (running in Windows CE) I use a XML file to store some configuration data that, at runtime, I load in a DataSet.
To read and to store these data I use the following code:
PrivateSharedFunction SetCfgData() AsBooleanTryDim fs AsNew FileStream(CGlobali.CfgDataFileComplName, FileMode.Open)
Dim xr As XmlReader = System.Xml.XmlReader.Create(fs)
'CGlobali.CfgData is a DataSet
Catch ex As System.IO.FileNotFoundException
MessageBox.Show("File " & CGlobali.CfgDataFileComplName & " not found.")
ReturnFalseCatch ex As XmlException
MessageBox.Show("XmlException occured: " & ex.ToString)
When the user modifies these data, they are automatically updated in the DataSet and saved in the file, at least that's what I would do...
To save the data from the DataSet to the file I do this:
PrivateSharedFunction UpdateCgfFile() AsBooleanTryDim StreamEncoding As Encoding
StreamEncoding = Encoding.Unicode
Dim cfgfile AsNew System.IO.StreamWriter(CGlobali.CfgDataFileComplName, True, StreamEncoding)
ReturnTrueCatch ex As Exception
What I would get with the above code is to update existing fields in the xml file with the new values, but what I get is that the same fields are added to the existing ones.
I have a assembly A that must use .NET framework 3.5. This assembly has a referense to a 3rd party assembly that has been developed with .net framework 4.0. The problem is that I can't build because the 3rd party uses FW 4.0. Is it possible to solve this?