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
0
Question by ZorNiFieD · Feb 06, 2013 at 01:54 AM · sqlitelinq

DbLinq and SQLite

Has anyone had any luck getting SQLite to work with DbLinq or just to get DbLinq working in unity? I've spent all day working on this and am really frustrated. I've got compilable code and everything seams right but when I run the app, I get a simple: "No Such Host is Known" error along with 1 other error about System.Net.TCP. I'm assuming DbLinq is trying to access a server instead of the file based sqlite file I have specified. Here is my code I came up with after doing 40 other steps outside of unity just to get this thing up and running:

 using UnityEngine;
 using System.Collections;
 //using System.Data.Linq;
 using System.Linq;
 using KonCraft.Data;
 using DbLinq.Data.Linq;
 using DbLinq.Sqlite;
 
 public class DatabaseHelper : MonoBehaviour {
     
     KonCraftDataContext db;
     
        void Start () {
         
         db = new KonCraftDataContext(
             "DbLinqProvider=Sqlite;Data Source=gamedata.db"
             );
         
         var blocks = (from b in db.TblBlocks            
             select b);
         
         Debug.Log(blocks.First().BlockName.ToString ());
     }

 }
 
Comment
Add comment · Show 1
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 asavasamuel · Mar 04, 2013 at 07:07 AM 0
Share

rickyhenry

This may help, here is Linq to SQLite. https://www.kellermansoftware.com/p-47-net-data-access-layer.aspx

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by nicolasjr · Nov 06, 2015 at 09:59 AM

If you're interested, I've developed a plugin that has all the connections sorted out, for all platforms, and it also makes database integration extremely simple, since it allows you to store and retrieve data without writing queries.

Case you want to check it out, here's the link to the asset store page:

https://www.assetstore.unity3d.com/en/#!/content/45771

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

10 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

Related Questions

Unloading broken assembly Assets/Resources/System.Data.SQLite.Linq.dll, this assembly can cause crashes in the runtime 1 Answer

More than one row in an array not displaying in a FOR loop 2 Answers

Sparse octree in Sqlite? 0 Answers

System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded. 1 Answer

Problem with SQLite unity Database 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