locked
MS sql tabel with non basic-latin characters (Ø) in table name causes errors RRS feed

  • Question

  • I'm new to lightswitch, and I am having trouble using a ms-sql 2008 database with table and column names that have non basic latin characters (in particular Danish characters ø,Ø,Æ,æ,Å,å). I have no problem seeing and connecting to the tables, but when I make a screen, and then build the project, the screen shows same first- record in all rows. I have checked from ssms and the tables here Work just fine.

    Is this a known bug in lightswith or the database framework?

    Does anybody know a workaround?

    Are there any settings I can use to get it working?

    I have tried creating synonyms for the tables, but these synonyms does not show up in VS when connecting to tables.

    I have also tried with views, but views end up being read-only.

    I am using Visual studio 2013 sp1.

    Any help would be greatly appreciated.

    Regards

    Tom

    Thursday, April 17, 2014 7:26 PM

Answers

  • There is a quick workaround.

    In LightSwitch entity designer change the properties 'name' and 'plural name' to logical names with just ascii characters (still ok in external database). In my quick test I only had to change the 'plural name' to solve the problem that you have.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Sunday, May 11, 2014 9:46 AM

All replies

  • Hi Tom,

    Welcome to LightSwitch forum.

    I think we need look into this issue, first we need connect to database properly,

    Connect LightSwitch to an Existing Database

    you will see how to use an existing database with Visual Studio LightSwitch. You will also see how to update LightSwitch entities and screens when schema changes are made to the external database.

    If it still has same issue, please let me know, we will look into it further.

    Best regards

    Angie


    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.

    Thursday, April 24, 2014 9:48 AM
  • Thank you for the reply. I have looked at this video before.

    I only have the problem with tables with the danish Ø letter in the name, not with other tables. When I make a browse screen based on a table with letter Ø as the first letter in the table name, I get same record shown on screen over and over.

    Unfortunately renaming the table names is something that I have to avoid as many other systems are using the tables, so it would be a big job updating all these systems.

    regards

    Tom

    Thursday, April 24, 2014 10:18 AM
  • Here steps to reproduce the error:

    Create table on sql (2008r2) server:

    SET QUOTED_IDENTIFIER ON
    GO

    CREATE TABLE [dbo].[Øtest](
        [ID] [int] IDENTITY(1,1) NOT NULL,
        [name] [nvarchar](50) NULL,
     CONSTRAINT [PK_Øtest] PRIMARY KEY CLUSTERED
    (
        [ID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY]

    GO

    INSERT INTO dbo.Øtest (name)
    VALUES ('alfa');
    INSERT INTO dbo.Øtest (name)
    VALUES ('beta');
    INSERT INTO dbo.Øtest (name)
    VALUES ('ceta');

    Then in VS 2013 create new lightswitch html project.

    Connect to the database and select the table

    create new browse screen based on the table

    then run it.

    The screen will show the same record multiple times.

    Thursday, April 24, 2014 10:37 AM
  • Any news on this issue? Is it a bug in lightswitch and is there a workaround?
    Sunday, May 4, 2014 4:05 PM
  • Hi Tom,

    Thanks for your response.

    I think you could consider submitting this issue to Microsoft Connect site, our engineers will reproduce this issue according to the proof you provide, and they will evaluate this issue seriously. You can also attach this thread as a proof.

    Best regards

    Angie

     


    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.

    Friday, May 9, 2014 3:13 AM
  • There is a quick workaround.

    In LightSwitch entity designer change the properties 'name' and 'plural name' to logical names with just ascii characters (still ok in external database). In my quick test I only had to change the 'plural name' to solve the problem that you have.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Sunday, May 11, 2014 9:46 AM
  • It works! Sticking to ascii in properties names in the designer helped.

    Thanks for the workaround Dave.

    I've reported the bug to the MS connect site

    Monday, May 12, 2014 5:41 PM