Update Model from database does not update Nullable Property -- Possible bug?

Hi,
I don't know if this is the correct forum.
When updating Model from database seems does not update the entity nullable property.
and it will not update the Default Value from the Backend (MSSQL) also.
I am using VS2008 SP1 3.5EF, XP64Bit Machine.
Thanks
vb.net GUI

maybe related..
today.. i changed the PK size.. from char(10) to char(36)
got many problems.. easy to fix...
but some query stop working:
Table1Record.Table2Reference.Load(); //i'm trying to load table2 from table1..
throw this error: A relationship multiplicity constraint violation occurred: An EntityReference expected at least one related object, but the query returned no related objects from the data store.
i get this error only when PK is greater than char(10)...
with SQL profiler.. i saw that PK was truncated to char(10) :
exec sp_executesql N'SELECT [... some fields...]
FROM  [dbo].[Table1] AS [Extent1]
INNER JOIN [dbo].[Table2] AS [Extent2] ON [Extent1].[NoTable2] = [Extent2].[NoTable2]
WHERE [Extent1].[NoTable1] = @EntityKeyValue1',N'@EntityKeyValue1 char(10)',@EntityKeyValue1='a2164b14-e'
(NoTable1 is the PK changed from char(10) to char(36))
i'm working with VS.NET 2008
so, i looked at Model1.Edmx... in notepad
CSDL was not changed when i did the "Update Model from Database" !!!
here is SSDL part:
        <EntityType Name="Table1">
          <Key>
            <PropertyRef Name="NoTable1" />
          </Key>
          <Property Name="NoTable1" Type="char" Nullable="false" MaxLength="36" />
here is CSDL part:
        <EntityType Name="Table1">
          <Key>
            <PropertyRef Name="NoTable1" />
          </Key>
          <Property Name="NoTable1" Type="String" Nullable="false" MaxLength="10" Unicode="false" FixedLength="true" />
Cool.. i found the prob.... but why ? and how to correct this ? manually change Model1.Edmx in notepad ??
why the maxlength property is readonly in Model Browser pane ??
what about VS.NET 2010 ?! same prob ??
is it a bug or by design ?
I hope this can help someone.. I spent a few hours on this prob
Patrick

Similar Messages

  • CRVS2010 beta - Date field from database does not display in report

    Hi there - can someone please help?!
    I am getting a problem where a date field from the database does not display in the report viewer (It displays on my dev machine, but not on the client machines...details given below)
    I upgraded to VS 2010
    I am using the CRVS2010 Beta
    My development machine is Windows 7 - and so is my fellow developer's
    We are using Microsoft SQL Server 2000
    We run the queries within VS and then we send the data table to VS using .SetDataSource
    We have a few reports which display the date on our dev machines (whether we run the EXE or from within Visual Studio)
    When we roll out to the client machines (running Windows XP SP3) then everything works, except that the date does not display (on quite a few reports)
    This is the only real issue I have had - a show stopper for me
    The rest works well - any input will be greatly appreciated
    Regards,
    Ridwan

    Hi Ridwan,
    After much testing I have it all working now using CRDB_adoplus.dll as a data source ( XML )
    Alter your Config file to look like this:
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    </startup>
    Then using the code below, and CR requires the Schema to be able to read the date format.
    private void SetToXML_Click(object sender, EventArgs e)
    CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    ISCDReportClientDocument rcd;
    rcd = rptClientDoc;
    string connString = "Provider=SQLOLEDB;Data Source=dwcb12003;Database=xtreme;User ID=sb;Password=password";
    string sqlString = "Select * From Orders";
    OleDbConnection oleConn = new OleDbConnection(connString);
    OleDbDataAdapter oleAdapter = new OleDbDataAdapter(sqlString, oleConn);
    //OleDbDataAdapter oleAdapter2 = new OleDbDataAdapter(sqlString2, oleConn);
    DataTable dt1 = new DataTable("Orders");
    oleAdapter.Fill(dt1);
    System.Data.DataSet ds = new System.Data.DataSet();
    // We need the schema to get the data formats
    ds.WriteXml("c:
    sc.xml", XmlWriteMode.WriteSchema);
    //Create a new Database Table to replace the reports current table.
    CrystalDecisions.ReportAppServer.DataDefModel.Table boTable = new CrystalDecisions.ReportAppServer.DataDefModel.Table();
    //boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
    PropertyBag boMainPropertyBag = new PropertyBag();
    //boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
    //In the main property bag (boMainPropertyBag)
    PropertyBag boInnerPropertyBag = new PropertyBag();
    //Set the attributes for the boInnerPropertyBag
    boInnerPropertyBag.Add("File Path ", @"C:\sc.xml");
    boInnerPropertyBag.Add("Internal Connection ID", "{680eee31-a16e-4f48-8efa-8765193dccdd}");
    //Set the attributes for the boMainPropertyBag
    boMainPropertyBag.Add("Database DLL", "crdb_adoplus.dll");
    boMainPropertyBag.Add("QE_DatabaseName", "");
    boMainPropertyBag.Add("QE_DatabaseType", "");
    //Add the QE_LogonProperties we set in the boInnerPropertyBag Object
    boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
    boMainPropertyBag.Add("QE_ServerDescription", "NewDataSet");
    boMainPropertyBag.Add("QE_SQLDB", "False");
    boMainPropertyBag.Add("SSO Enabled", "False");
    //Create a new ConnectionInfo object
    CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo =
    new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
    //Pass the database properties to a connection info object
    boConnectionInfo.Attributes = boMainPropertyBag;
    //Set the connection kind
    boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    //*EDIT* Set the User Name and Password if required.
    boConnectionInfo.UserName = "";
    boConnectionInfo.Password = "";
    //Pass the connection information to the table
    boTable.ConnectionInfo = boConnectionInfo;
    //Get the Database Tables Collection for your report
    CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
    boTables = rptClientDoc.DatabaseController.Database.Tables;
    //For each table in the report:
    // - Set the Table Name properties.
    // - Set the table location in the report to use the new modified table
    boTable.Name = "Orders";
    boTable.QualifiedName = "Orders";
    boTable.Alias = "Orders";
    rptClientDoc.DatabaseController.SetTableLocation(boTables[0], boTable);
    //Verify the database after adding substituting the new table.
    //To ensure that the table updates properly when adding Command tables or Stored Procedures.
    rptClientDoc.VerifyDatabase();
    MessageBox.Show("Data Source Set", "RAS", MessageBoxButtons.OK, MessageBoxIcon.Information);
    Thanks again
    Don

  • Yoga Tablet 2 Lollipop Update - Google Play Services does not update - installation error

    Lenovo is investigating customer reports that after upgrading Yoga Tablet 2 8 830 or 10 1050 to Android 5.0.1 Lollipop, Google Play Services does not update as expected, and shows an installation error.
    A workaround has been identified while this is under investigation. It can be found here: https://forums.lenovo.com/t5/Android-Yoga-Series-Tablets/Yoga-Tablet-2-series-Android-5-Lollipop-experiences-and-problems/m-p/2105390#M8061
    It would help the investigation if several customers would be willing to provide logs capturing this failure event for Yoga Tablet 2 8 or 10 1050 models.
    To capture logs, please follow this procedure: http://support.lenovo.com/us/en/products/tablets/yoga-series/yoga-tablet-2-830/documents/HT103449
    Once you have collected the logs, please zip the files and attach them to an email which can then be sent to [email protected] If the file is too large to send, please provide a link to the hosted file.
    With the email, please include the following information:
    Name:
    Forums User ID:
    Model: 
    S/N:
    Discussion Link: https://forums.lenovo.com/t5/Android-Yoga-Series-Tablets/Yoga-Tablet-2-Lollipop-Update-MicroSD-Card-...
    A description of the failure and any other information you would like to share:
    Zipped attachment or link to hosted file:
    Once I receive multiple logs, I will open a case to escalate these reports for a solution.
    Thank you,

    To lenovo.   The reason I bought this tab is that I believe it has good quality and its performance is excellent especially from lenovo. But if lenovo reasons out that they cannot override the code that is in apk  itself from Google playstore. Can u provide a link or procedure how to go back from lollipop to KitKat until it is resolved? Because we cannot do the things we should do especially work related if we can't download or update any apps tnx. 

  • Clicking update opens apps, but does not update them

    When I click "update" in the app store, the app that should update opens, but does not update.
    DEVICE: I am using an ipad mini with iOS 7.0.6 and 5.6 GB of storage available.  I don't have any kind of app manager apps or anything like that.
    THINGS I HAVE TRIED:
    rebooting
    closing all apps and rebooting
    signing out of app store, closing all apps, rebooting, and signing back in to app store
    deleting apps to create more space
    changed app store settings to update automatically

    Here's a link to a thread that solved the problem for me:
    http://discussions.apple.com/thread.jspa?messageID=12552345&#12552345
    The culprit was that the Flash plugin needed updating for FF. That was it.
    Go to Firefox; Preferences; General (tab); Add-ons; Manage Add-ons; Plugins.
    I clicked on Find Updates and immediately updated the Flash plugin.
    Hope this helps others.

  • When i try to update my ipod it does not update? help please!

    When i try to update my ipod video it does not update for some reason i dont know why it just doesnt can someone help me here?
    [email protected]
    [email protected]

    Not with that amount of info, no.
    Update what? The iPod software? New songs? What have you tried to fix the issue so far?

  • Change Max.no.quants in IMG but in database does not update.

    hi,
    I have an issue about reducing Max.no.quants in warehouse management. I defined putaway strategy P for Storage type definition. Then I changed Max.no.quants from 5 to 2 in Division of Storage Bins into Sections (IMG) and assigned Bin section A = 2 (Max.no.quants) in Bin Sectioning per Storage Bin Type and SUT (IMG). After that I removed items from stack 5 to 2 in each Storage bin. Then I checked storage bin in Bin sectioning tab I found that Max.no.quants still didn't change from 5 to 2 I thought it should be changed and no. of quants had changed to 2. So, that i checked table LAGP-KZVOL = " ". It seems the database was not up-to-date. When I create Transfer Order it had shown an error message below
    Error due to inconsistent database (storage bin ZZ-01-01)
    Are there any solutions to update Max.no.quants(LAGP-MAXQU) from 5 to 2 in Storage bin? or Can I create a program to update table LAGP-MAXQU and LAGP-KZVOL directly? (i am not sure which tables and fields should i have to concern?)

    hi,
    I have an issue about reducing Max.no.quants in warehouse management. I defined putaway strategy P for Storage type definition. Then I changed Max.no.quants from 5 to 2 in Division of Storage Bins into Sections (IMG) and assigned Bin section A = 2 (Max.no.quants) in Bin Sectioning per Storage Bin Type and SUT (IMG). After that I removed items from stack 5 to 2 in each Storage bin. Then I checked storage bin in Bin sectioning tab I found that Max.no.quants still didn't change from 5 to 2 I thought it should be changed and no. of quants had changed to 2. So, that i checked table LAGP-KZVOL = " ". It seems the database was not up-to-date. When I create Transfer Order it had shown an error message below
    Error due to inconsistent database (storage bin ZZ-01-01)
    Are there any solutions to update Max.no.quants(LAGP-MAXQU) from 5 to 2 in Storage bin? or Can I create a program to update table LAGP-MAXQU and LAGP-KZVOL directly? (i am not sure which tables and fields should i have to concern?)

  • When I follow the update instructions my firefox does not update, I have clicked on the update button and the browser just closes

    When I click on Help / About / Apply update it does not appear that anything happens / changes with my browser.
    Application Basics
    Name
    Firefox
    Version
    6.0.2
    User Agent
    Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
    Profile Directory
    Open Containing Folder
    Enabled Plugins
    about:plugins
    Build Configuration
    about:buildconfig
    Extensions
    Name
    Version
    Enabled
    ID
    Skype Click to Call
    5.8.0.8855
    true
    {82AF8DCA-6DE9-405D-BD5E-43525BDAD38A}
    Youtube Music Player
    4.11.0.30
    true
    [email protected]
    Java Console
    6.0.32
    false
    {CAFEEFAC-0016-0000-0032-ABCDEFFEDCBA}
    Modified Preferences
    Name
    Value
    accessibility.typeaheadfind.flashBar
    0
    browser.places.smartBookmarksVersion
    2
    browser.startup.homepage_override.buildID
    20110902133214
    browser.startup.homepage_override.mstone
    rv:6.0.2
    extensions.lastAppVersion
    6.0.2
    network.cookie.prefsMigrated
    true
    places.database.lastMaintenance
    1384358025
    places.history.expiration.transient_current_max_pages
    120635
    privacy.donottrackheader.enabled
    true
    privacy.sanitize.migrateFx3Prefs
    true
    security.warn_viewing_mixed
    false
    Graphics
    Adapter Description
    AMD M880G with ATI Mobility Radeon HD 4250
    Vendor ID
    1002
    Device ID
    9712
    Adapter RAM
    256
    Adapter Drivers
    aticfx64 aticfx64 aticfx32 aticfx32 atiumd64 atidxx64 atiumdag atidxx32 atiumdva atiumd6a atitmm64
    Driver Version
    8.822.4.0
    Driver Date
    2-28-2011
    Direct2D Enabled
    true
    DirectWrite Enabled
    true (6.2.9200.16571)
    ClearType Parameters
    ClearType parameters not found
    WebGL Renderer
    Google Inc. -- ANGLE -- OpenGL ES 2.0 (ANGLE 0.0.0.686)
    GPU Accelerated Windows
    1/1 Direct3D 10

    hello mccormick.lee, please try downloading the full setup file for the current firefox version from https://www.mozilla.org/firefox/all/ and install it on top of your current installation.

  • Updating 8.1.2 does not update

    HI,
    I must say, Acrobat 8 is the most annoying app for Mac. Now, how the hell can I update the 8.1.2 patch if the acrobat 8 icons are grayed (dimmed) out? basically I can not choose my installed acrobat (part of CS3) in order to update it.
    Also by the way, why does the updater installs a new updater that only checks for CS4 updated when I do not even have CS4?
    just wasted another hours worth of work trying to solve a ridicules Adobe FU.
    thanks
    Mic

    Go to<br /><br /><ftp://ftp.adobe.com/pub/adobe/reader/8.1/><br /><br />You need to choose the udpater corresponding to the language of Acrobat <br />you are using.<br /><br />Mike

  • I am returning to using firefox 4.?.....I will need to turn off the automatic software update so that it does not update back up to firefox 7 again.

    Hi, I am back again with my tweaked brain. LOL I am trying to go back to Firefox 4, which I had so much less trouble with and liked a whole lot more. I am told that after installing the older version I need to turn off the automatic Firefox software update (if enabled)........I don't know where the automatic software update is located. Can you help me? Thank you for your help.......I will check back in a little while.......GOD bless you and all that you do for others.........loving you in Christ.......<3

    You can try to clear the cache and cookies to see if that makes a difference:
    <h3>Clearing Cache</h3>
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    <h3>Clearing Cookies</h3>
    #Go to Firefox > Tools > Privacy > Remove Individual Cookies
    #Find the site (ebay.com) that's having problems and clear all cookies.
    #Restart Firefox
    Further information can be found in the [[Clear your cache, history and other personal information in Firefox]] article.

  • Update Entity Model from Database in edmx

    Dear All
    Thank you for your attention.
    I would like to know the easy way to modify the edmx after changes of database.
    e.g. I modified a order table 's primary key from OrderNumber to ID
    and so the foreign key constraint to another table is also changed from OrderNumber to ID
    then open existing edmx and  'Update Model from Database'.
    The tables are changed but there are errors
    Error 1
    Error 111: Properties referred by the Principal Role t1 must be exactly identical to the key of the EntityType Model.t1 referred to by the Principal Role in the relationship constraint for Relationship Model.FK_t2_t11. Make sure all the key properties are specified
    in the Principal Role.
    and two relations exists
    How to modify the current edmx to let it works?
    Thanks
    Best Regards
    mintssoul

    Hello mintssoul,
    >>I would like to know the easy way to modify the edmx after changes of database.
    I suggest you could firstly delete these modified entities in the design window(it will delete these type definition in emdx file) and then use Update Model from Database command to re-generate these entities.
    Regards,
    Fred.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Version 8.1 Can't Activate, Can't Update, Can't create/export NX *.prt Files to 3D PDF. Screen Capture feature does not properly represent Model/Bodies. Printing from NX does not recognize Adobe Acrobat 3D as a printer to try and export.

    Version 8.1 Can't Activate, Can't Update, Can't create/export NX *.prt Files to 3D PDF. Screen Capture feature does not properly represent Model/Bodies. Printing from NX does not recognize Adobe Acrobat 3D as a printer to try and export.
    I was able to register it though.

    Not a surprise. The Acrobat 8 product family passed into End of Support back in 2011.
    Be well...

  • Can't add music my iPhone from iTunes.  When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.  [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to

    Can't add music my iPhone from iTunes.
    When I try to drag a song over to my phone, I get the circle w/ the syncing line through it, but it does not update/load.
    [Manually manage music and videos] is checked. And, this is the only Mac I have ever used to add music to my phone.
    Also, just updated the phone's software today, and iTunes' software is already up to date.

    Hi Gregg,
    Have you tried resetting the device (nothing will be lost): Hold down the Home and Power buttons at the same time and continue to hold them down until the Apple appears (up to 30 seconds). Once the Home screen redisplays, see if your Music app is behaving normally.
    Cheers,
    GB

  • Application Compatibility does not update the database.

    Hi,
     I am using application compatibility manager 6.1, and SQL server 2012 as database. ACT run ok and it create the XML file but it does not update the database at "C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA" location.
    I can see the valid XML file but somehow the MDF file of database is not updated so my ACT windows does not showing anything on it.
    Any Help would be appreciated.
    Thanks
    Rakesh Patel
    rakesh patel

    Hi Rakesh,
    I am not sure if you have resloved your issue.
    But for helping others to know what to do if they meet the same issue as yours, I consider to mark the post as answered.
    If you would like further assistance, please post back and we will be always here to help you.
    Any concern about this mark behavior, you can just unmark it.
    Thanks for your understanding.
    Regards,
    Kelvin hsu
    TechNet Community Support

  • Updateing CustomXML scheema from sharepoint 2010 in VBA does not update the DIP (Document information panel)

    I need to update a schema from Sharepoint with namespace
    http://schenas.microsoft.com/office/2006/metada/contentType when i am opening a Word document. I am using VBA to do so. When i have made the Changes it does not update the DIP, not until i save the document.
    Is there a way to update the dip using VBA.
    /Ola
    olha

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office client. For any VBA related issues, I would suggest you to post in related MSDN forum -
    Microsoft Office for Developers, to get better support experience:
    https://social.msdn.microsoft.com/Forums/office/en-US/home?category=officedev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • ITunes Last Played does not update when syncing from iPod

    When I synch any of my Ipods, the last played field does not update in Itunes.
    If I play the song from Itunes. (11.1.5)  Last Played  works fine.
    I tried the crossfade solution, but that did not work. My crossfade was already not selected.
    Any other thoughts?
    Thanks

    As if by magic it is now working. I went away from the mac for a couple of hours, came back and it started to work. This is scary as I would expect this kind of action on a Mickysoft machine but not a Mac. Ho Hum - at least the problem has been sorted even if I don't know how.
    Chris

Maybe you are looking for

  • Why can't I download Adobe Flash Drive on my I-Pad2?

    I have tried watching several different video's on-line and am told on all different web sites to download Adobe Flash Reader, when I try to download it a new screen comes up saying "sorry, you cannot download this with this device". What is that abo

  • How to use Jco to read a transparent table?

    For example I want to use java to read table T002, I can use Jco, but does anybody know how to use Jco to read a data table? Best regards, Lament

  • SAP Exits in Bex

    Hi,   I need to create 2 SAP Exits on Fiscal Year and Posting Period....That will dynamically display Current Year and period data in report output Can you plese give me details process how can i create them and also which sap exit or replacement var

  • Some apps started downloading on their own when I downloaded a different one.

    I was downloading an app from the App Store.  When I tapped on the download button for it, several others started downloading at the same time.  I was able to get refunds for a couple, but it says the others are in eligible for a refund.  I stopped t

  • Zooming in or zooming out of images

    how to zooming in or out by clicking on left or right button of mouse click?