Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
1
Question by Boxer · Mar 24, 2011 at 07:47 AM · builddatabasesql

Cannot connect SQL Server After building

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 .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!

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Meltdown · Mar 24, 2011 at 11:24 AM 0
Share

What does your connection string to the databse look like?

avatar image Boxer · Mar 25, 2011 at 03:40 AM 0
Share

Like this: string connstr = "Server=XZZ-PC\\ProjectData;" + "Database=FJHHbattlefieldEnvironments;" + "User ID=sa;" + "Password=123456"; conn=new SqlConnection(connstr); conn.Open(); and it works well before building the exe

avatar image rayjay214 · Mar 23, 2012 at 11:06 AM 0
Share

the same problem as yours,I use Chinese version sql server 2005 too,besides,are you Chinese?

avatar image Bunny83 · Mar 23, 2012 at 11:06 AM 0
Share

@rayjay214: Use comments if you don't post an answer.

btw. according to Li Lincheng's user page he / she lives in china so i guess he / she is chinese ;)

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer Wiki

Answer by Boxer · Apr 20, 2011 at 06:41 AM

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SeneyHsns · Mar 27, 2015 at 12:53 AM 0
Share

I have already included I18N.CJ$$anonymous$$.dll I18N.West.dll and I18N.dll in my project and it work well after build as exe, but not work as web. I drive me crazy.

avatar image Bunny83 · Mar 28, 2015 at 02:23 PM 0
Share

@seneyhsns: You are aware of the security sandbox in which the webplayer runs in? right? Almost all SQL connection libraries use a socket connection. Therefore, if you want to access an SQL server from a web build, you have to run a socket policy server along with your SQL server which explicitly allows the connection of a web player to the required port(s).

You should get security exceptions when you try to do something like that without a crossdomain policy server.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Can't Connect to SQLite after Build..... 3 Answers

Connecting to SQL database from iOS app made by Unity fail with error 0 Answers

Trouble with a build: CodePage 1250 not supported 1 Answer

Using a distant database? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges