Search Unity

Cannot connect SQL Server after building?

Discussion in 'Multiplayer' started by boxer276, Mar 29, 2011.

  1. boxer276

    boxer276

    Joined:
    Mar 28, 2011
    Posts:
    4
    Hi there!
    I'm using SQL Server 2008 as my database.
    When I run the game under Unity3D Project, everything works well, but if I build a standalone exe file under Windows 7 and run it outside, I cannot connect the SQL Server anymore.
    Anyone knows the solution? Do I miss some settings? Thanks!
    ps: I have copied the System.data.dll from C:\Program Files (x86)\Unity\Editor\Data\Mono\lib\mono\2.0 to the Plugins folder, should be the right one.
     
  2. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,307
    Hm ... not sure if this will help: MS SQL connection?

    For me, it works on Mac and Windows. For some things to work properly, you also need to include I18N.dll and I18N.West.dll, though (I think that's needed since Unity 3.0 or 3.2, not sure.
     
  3. boxer276

    boxer276

    Joined:
    Mar 28, 2011
    Posts:
    4
    I worked it out finally! Since I'm using a Chinese version SQL Server 2008, I need a I18N.CJK.dll(China,Japan,Korea) besides I18N.West.dll and I18N.dll under Assets folder. It works well now.
    Wish it could help for those facing the same problem.
     
  4. CrossV4

    CrossV4

    Joined:
    Dec 21, 2020
    Posts:
    13
    do you include any of more?,

    are we just put them into assets right, we do not have to make anything more? just put them assets folder ?
     
  5. elic55

    elic55

    Joined:
    Mar 14, 2019
    Posts:
    4
    I have this problem too.
    I am useing SQL Server 2016
    In edit mode run perfect and import data from server.
    When in standalone (pc windows 64) there is no communication with the server.
    Error:
    Encoding 1255 data could not be found. make sure you have correct international codeset assembly installed and enabled.
    I tried to put in the Assers folder different versions of I18n.dll I could find, and yet the same problem (for some versions I tried I get error massages in edit mode)
    I find those dlls in
    C:\Program Files\Unity\Hub\Editor\2019.3.15f1\Editor\Data\MonoBleedingEdge\lib\mono
    There are a lot of folders of differnt versions: 2.0-api, 4.0-api and up to 4.7.1-api
    There are also foders like unity, unityjit
    In all of them there are dlls i18n.dll, I18N.MidEast.dll etc.
    How can I know from whitch folder to take the dll, and whitch one of them?
    Thanks
     
  6. elic55

    elic55

    Joined:
    Mar 14, 2019
    Posts:
    4
    At last, after so many tries...
    It works!
    I put I18n.MiddleEast.dll whitch I took from unityjit folder and put it in the Assets folder.
    Why MiddleEast? apparently because my DB is hebrew_CS_AS?
    Why unityjit? I have no idea, maybe someone can tell.