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 Foram · Apr 08, 2013 at 05:50 AM · errordatabasedatalinq

Database Error (Sqlite) in unity 4.0

Assets/Scripts/Database.js(12,21): BCE0018: The name 'IDbConnection' does not denote a valid type ('not found'). Did you mean 'System.Runtime.InteropServices.ComTypes.ITypeComp'?

Assets/Scripts/Database.js(13,21): BCE0018: The name 'IDbCommand' does not denote a valid type ('not found'). Did you mean 'System.Runtime.InteropServices.ComTypes.ITypeComp'?

Assets/Scripts/Database.js(14,22): BCE0018: The name 'IDataReader' does not denote a valid type ('not found').

Comment
Add comment · Show 6
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 DaveA · Apr 08, 2013 at 06:08 AM 3
Share

Post code.

avatar image Chronos-L · Apr 08, 2013 at 06:13 AM 0
Share

Have you import the necessary package containing the definition of IDbConnection?

avatar image Foram · Apr 08, 2013 at 06:23 AM 0
Share

Yes , I have imported necessary packages.

 import UnityEngine;
 import System;
 import System.Collections;
 import System.Data;
 import System.Data.Linq;
 import $$anonymous$$ono.Data.Sqlite;
 import DbLinq;

Also , If i put my script in Plugins/Editor folder or Assets/Editor folder , the errors are gone. But then I cant access this script in other scripts . I dont understand this.

avatar image Foram · Apr 08, 2013 at 06:31 AM 0
Share
 static var databaseName : String = "my_db.sqlite";
 class Database 
 {
     var connection : String;
     var dbcon : IDbConnection;
     var dbcmd : IDbCommand;
     var reader : IDataReader;
     
     function OpenDB()
     {
         if(Application.platform == RuntimePlatform.IPhonePlayer)
         {
             connection = "URI=file:" + Application.dataPath.Replace("/Data","/") + databaseName;
             //connection = "URI=file:" + Application.persistentDataPath + "/" + databaseName;
         }
         else
         {
             connection = "URI=file:" + databaseName; 
         }
         
         Debug.Log("DB  Path : " + connection);
         dbcon.Open();
     }
 }
avatar image Foram · Apr 08, 2013 at 06:38 AM 0
Share

After putting my script in Editor folder, All errors are gone. Then I access my script as following :

var db : Database = new Database(); db.OpenDB();

And I got the error :

BCE0018: The name 'Database' does not denote a valid type ('not found').

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Foram · Jul 09, 2013 at 05:07 AM

Put Mono.Data.Sqlite.dll , Mono.Data.SqliteClient.dll , sqlite3.dll and System.Data.dll into Plugins folder.

Dont put Database in Editor Folder. Put it anywhere else

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

13 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Linq Query - Strange Outcome 1 Answer

SQL connection problem 0 Answers

Calling Json script and displaying the Images within the script 0 Answers

Alternative to storing data in DB's 2 Answers

Storing Constant data in a mobile game 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