# How do I reference SQLite?

**URL:** https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915
**Category:** Silver
**Created:** [March 20, 2015, 1:26pm UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915 "2015-03-20T13:26:56Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![aaronbratcher1](https://talk.remobjects.com/user_avatar/talk.remobjects.com/aaronbratcher1/32/6180_2.png) [@aaronbratcher1](https://talk.remobjects.com/u/aaronbratcher1)
#### Post date: [March 20, 2015, 1:26pm UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/1 "2015-03-20T13:26:56Z")

</div>

It is very, very exciting to see someone take Swift to other platforms. I am looking forward to trying it out with my own personal projects.

With that in mind, I would like to use a SQLite wrapper I have in Xcode in Fire. How do I make the solution reference SQLite so that my code will compile?

Does Fire use a bridging-header file similar to Xcode or do I need to do something else so my code will work properly with SQLite?

I’ll take a look at Sugar for file reference so the wrapper class is device agnostic. (Will the version on GitHub now work or do I need a special version?)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [March 20, 2015, 3:36pm UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/2 "2015-03-20T15:36:31Z")

</div>

We currently don’t have a platform-agnatic Sqlite abstraction in Sugar yet (we’d love for someone to contribute one ;). Bu you can reference the native SQLite library bon each platform. For Cocoa, we ship an imported .fx file in the box, just add it via Add Reference, for .NET and Java you’ll need to grab the official `.dll` or `.jar` file and just reference that.

hth,  
marc

---

<div class="post-metadata">

### Author: ![aaronbratcher1](https://talk.remobjects.com/user_avatar/talk.remobjects.com/aaronbratcher1/32/6180_2.png) [@aaronbratcher1](https://talk.remobjects.com/u/aaronbratcher1)
#### Post date: [March 20, 2015, 3:38pm UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/3 "2015-03-20T15:38:38Z")

</div>

Ah, ok. so I just “import SQLite” at the top of my file then?

As for adding it to Sugar… let me get myself cemented in and then I’ll see what I can do 🙂

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [March 20, 2015, 3:47pm UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/4 "2015-03-20T15:47:19Z")

</div>

> [@aaronbratcher1](#):
>
> Ah, ok. so I just “import SQLite” at the top of my file then?

And add a reference, see [References](http://docs.elementscompiler.com/Projects/References/) (and maybe also read [Namespaces and References](http://docs.elementscompiler.com/Oxygene/Delphi/NamespacesAndReferences/), ignore that it targets Delphi developer,s the topic still explains references vs namespaces well).

> [@aaronbratcher1](#):
>
> As for adding it to Sugar… let me get myself cemented in and then I’ll see what I can do

cool! 😉

---

<div class="post-metadata">

### Author: ![Koen\_Kraak](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/k/3bc359/32.png) [@Koen\_Kraak](https://talk.remobjects.com/u/Koen_Kraak)
#### Post date: [April 22, 2016, 9:49am UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/5 "2016-04-22T09:49:59Z")

</div>

It looks like SQLite is now supported on Android and iOS when looking at the SQLite.pas

I have Sugar.data.jar in my references for my Android project but var connection: SQLiteConnection results in an unknown identifier error.

Is it possible to use SQLiteConnection in the shared project? If so how do I reference it? What am I missing?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 22, 2016, 11:17am UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/6 "2016-04-22T11:17:36Z")

</div>

Do you have the namespace imported, too?

---

<div class="post-metadata">

### Author: ![Koen\_Kraak](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/k/3bc359/32.png) [@Koen\_Kraak](https://talk.remobjects.com/u/Koen_Kraak)
#### Post date: [April 22, 2016, 11:19am UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/7 "2016-04-22T11:19:34Z")

</div>

Yah I tried the imports:

import Sugar  
import Sugar.Data  
import SQLite  
import Sugar.SQLite  
import Sugar.SQLiteConnection

but without success

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [April 23, 2016, 8:07pm UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/8 "2016-04-23T20:07:53Z")

</div>

Sugar.Data is what you want to import. It’d be helpful to see the exact error(s) you’re getting, and maybe see a compete project to assist you further and narrow down what is going wrong…

---

<div class="post-metadata">

### Author: ![Koen\_Kraak](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/k/3bc359/32.png) [@Koen\_Kraak](https://talk.remobjects.com/u/Koen_Kraak)
#### Post date: [April 25, 2016, 9:28am UTC](https://talk.remobjects.com/t/how-do-i-reference-sqlite/5915/9 "2016-04-25T09:28:11Z")

</div>

Ah the problem was caused by an old version of sugar.data  
Your anwser in post:

> [@Http.ExecuteRequestAsJson ClassCastException](https://talk.remobjects.com/t/http-executerequestasjson-classcastexception/8854/22):
>
> 8.3 elements and I’m using VS

worked for me
