Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by FelixEdbert · Nov 03, 2015 at 10:38 AM · androiddatabasesqlite

SQLite Database for Android Unity Error

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 using UnitySampleAssets.CrossPlatformInput;
 using Mono.Data.Sqlite;
 using System.Data; 
 using System; 
 
 public class ShopScript : MonoBehaviour {
 
     public Text txtDamage;
     public Text txtAcc;
     public Text txtCurrent;
     public Text txtMax;
 
     public Text txtDamageUp;
     public Text txtAccUp;
     public Text txtCurrentUp;
     public Text txtMaxUp;
 
     public Sprite img;
 
     private String[] WName;
     private String[] WDamage;
 
     private int counter;
     private IDbConnection dbconn;
 
     void Start () {
         counter = 0;
         string connection = "URI=file:" + Application.persistentDataPath + "/MYGAMEDB.s3db";
         
         dbconn = (IDbConnection) new SqliteConnection(connection);
         dbconn.Open(); //Open connection to the database.
         IDbCommand dbcmd = dbconn.CreateCommand();
         string sqlQuery = "SELECT * FROM WeaponShop";
         dbcmd.CommandText = sqlQuery;
         IDataReader reader = dbcmd.ExecuteReader();
         while (reader.Read())
         {
 
             //WDamage[counter] = reader.GetString(2);
 
         }
         reader.Close();
         reader = null;
         dbcmd.Dispose();
         dbcmd = null;
         dbconn.Close();
         dbconn = null;
     }
     
 }

and this Error happen. how to fix it ?

EntryPointNotFoundException: sqlite3_next_stmt Mono.Data.Sqlite.SQLiteBase.ResetConnection (Mono.Data.Sqlite.SqliteConnectionHandle db) Mono.Data.Sqlite.SQLiteBase.CloseConnection (Mono.Data.Sqlite.SqliteConnectionHandle db) Mono.Data.Sqlite.SqliteConnectionHandle.ReleaseHandle () System.Runtime.InteropServices.CriticalHandle.Dispose (Boolean disposing) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs:56) System.Runtime.InteropServices.CriticalHandle.Dispose () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs:42) Mono.Data.Sqlite.SQLite3.Close () Mono.Data.Sqlite.SqliteConnection.Close () (wrapper remoting-invoke-with-check) Mono.Data.Sqlite.SqliteConnection:Close () Mono.Data.Sqlite.SqliteConnection.Open () ShopScript.Start () (at Assets/ShopScript.cs:37)

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by bibalexwalid · Apr 15, 2019 at 10:58 AM

Tutorial SQLite Unity3d 2018 or hegher( Android , Windows Phone , Windows , IOS, WINRT ) How to Connection Database Sqlite how to Create Table , Select , Insert , Update , Delete , Search

How to read data from on unity Solving all error in unity for assembly reference: 1- error "The type or namespace name Data' does not exist in the namespace 'Mono'. Are you missing an assembly reference?" 2- and error "The type or namespace name MONO' does not exist in the namespace Data'. Are you missing an assembly reference?" - using Mono.Data.Sqlite; - using System; - using System.Data; - using System.IO; - using UnityEngine.UI;

learning how: SQLite Admin to create database and tables ....... SQLite DLL to support unity .s3db extension and compile on unity for windows 32bit or 64bit.

Github example : https://github.com/walidabazo

Video

https://www.youtube.com/watch?v=dezAuScV9ZY

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Storing Constant data in a mobile game 0 Answers

Sqlite4Unity3d difficulties 1 Answer

SQLite works fine in Unity Editor but doesn't work in Android device (apk). 0 Answers

Help with SQLite for Android Errors in Unity3D? 1 Answer

why sqlite can't conneted after build in PC (.exe) 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