sqlite question

dougc

Member
Licensed User
Longtime User
From everything I have read in the user's manual and forums, I THINK I cannot read an sqlite DB directly but have to create a csv file (or such) and then (in code) create the DB I want to access in my application?

Is this correct or am I missing something? What I want to do is create a simple app that will pull data from a DB based on a users selection, I currently have no code but I have downloaded a couple of sql examples (sqltable3 and sqltable4) but they don't have a DB but rather a csv file of cities and latitude/longitude yet when I try to run the application I get an error that the DB cannot be read.

I error occurs at this line

SQL1.Initialize(File.DirDefaultExternal, "test1.db", True)

code(14) could not open the database

I have an sqlite DB (bibles.sqlite) that I can read just fine from firfox (with the sqlite plugin as well as from a PC with "razor". Do I need to create a csv file and then create a scriptures.db file from that?

Sorry but I have been trying to figure out what I need to do and while the documentation is good when dealing with accessing the DB, either I am totally missing something when it comes to creating the <file>.db file

thanks in advance for any responses

dougc

:sign0085:
 

klaus

Expert
Licensed User
Longtime User
Did you try the SQLViewer from Erel ?
You don't need to create a csv file.
You can read the database directly.
If your database file is in DirAssets you need to copy it to another folder before you can use it.
Did you read chapter 3 SQLite Database in the User's Guide ?

Best regards.
 
Upvote 0

rbabu

Member
Licensed User
Longtime User
SQLViewer code does not recognize FileDialog

Hi

I am getting an error compiling the SQLiteViewer - it does not recognize FileDialog class - where to get it?

Thanks
Ramesh
 
Upvote 0
Top