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 /
avatar image
1
Question by alienx2 · Apr 06, 2011 at 04:30 PM · builddatabasesqlitesql

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

I have problem about between SQLite and Unity.. look below:

http://dl.dropbox.com/u/563640/UnityWeb/UnityForum/InEditor.jpg In Unity Editor (Working)

alt text After Build, Unity Web player (Not Work)

I tested on HTTP and localhost and root folder...

Why its not showing up in webplayer after build? Did i miss something? or something wrong with DLL file? :confused: and my script look below:

here script:

using UnityEngine; using Mono.Data.SqliteClient; using System; using System.Data; using System.Collections; using System.Collections.Generic;

public class SQLiteServer : MonoBehaviour {

 private static IDbConnection dbcmd;

 private D jsScript;

 // Use this for initialization
 void Start () {
     jsScript = GameObject.Find("GUI Text").GetComponent<D>(); //Debug mode

     string connectionString = "URI="+ Application.dataPath + "/test.db"; // directory for MAC

     jsScript.msg = "Prepare Connect...";

     IDbConnection conn;

     conn = new SqliteConnection(connectionString);

     jsScript.msg = "Prepare Connect 2..."; //Stuck in Webplayer

     conn.Open();

     print("Connection: " + conn.State);
     jsScript.msg = "Connection: " + conn.State; //No Show... 

     IDbCommand dbcmd = conn.CreateCommand();

I did put DLL to ../Assets/Libraries/:

  • I18N.dll
  • I18N.West.dll
  • Mono.Data.SqliteClient.dll
  • sqlite3.dll System.Configuration.dll
  • System.Data.dll System.Drawing.dll
  • System.EnterpriseServices.dll
  • System.Security.dll

Comment
Add comment · Show 2
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 Boxer · Apr 20, 2011 at 05:51 AM 0
Share

I'm using SQL Server as the database, and I have exactly the same problem. It has kept bothering me for long. If you have sloved it, let me know, please.

avatar image Boxer Boxer · Apr 20, 2011 at 06:51 AM 0
Share

Just now I worked it out finally!

Since I'm using a Chinese version SQL Server 2008, I need a I18N.CJ$$anonymous$$.dll(China,Japan,$$anonymous$$orea) besides I18N.West.dll and I18N.dll under Assets folder. It works well now. Wish it could help for you. Just add a I18N.your country.dll will help.

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Meltdown · Dec 05, 2012 at 11:04 AM

The web player doesn't allow local file access. Thus a SQLLite database will never open if accessed through a web player.

It's a security restriction of the web player. You'll need to store your data in PlayerPrefs or via a web service.

Comment
Add comment · 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
1

Answer by Oksana Iashchuk · Dec 14, 2012 at 06:01 PM

SQLiteKit asset could help you to manage your SQLite3 database even on web! That library has examples how to run it.

Comment
Add comment · Show 1 · 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 Meltdown · Dec 14, 2012 at 06:51 PM 0
Share

interesting

avatar image
-1

Answer by GamerUnity · Apr 24, 2011 at 10:01 PM

HI for the Sqlite problem it seems to be that you must add SQlite3 this is the driver put it youProjectName/ and evrey thing will be all right :)

Comment
Add comment · 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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Distribute terrain in zones 3 Answers

Hiding the SQLite file 0 Answers

Sparse octree in Sqlite? 0 Answers

Looking for step-by-step manual how to configure SQL Lite on Unity 2017 ( or other database) 1 Answer

Errors from sqlite 0 Answers


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