Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
Posts: 53
Registered: ‎02-22-2011
My Device: Blackberry Torch 9800
Accepted Solution

SQLite filetypes

Hey guys,

 

I've been able to work with the .db file type using the SQLite commands in AS, however I now have a .sql file that I would like to read from. Is there anyway to read the .sql file? I'm currently getting  an error stating that this is not a valid database type.

 

If there isn't a way to read a file with a .sql extension, does anyone know of a way to convert it to the .db file type?

 

Thanks in advance,

David

Twitter: dmbproduction
Playbook App: Food Journal
Trusted Contributor
Posts: 152
Registered: ‎02-23-2011
My Device: dev alpha playbook 9500 8300

Re: SQLite filetypes

.sql file normally means there are some SQL statment in the file , you can run the sql file at database console .
Developer
Posts: 53
Registered: ‎02-22-2011
My Device: Blackberry Torch 9800

Re: SQLite filetypes

what's database console? I've been using the firefox SQLite plug in to view my .sql file and it renders properly
David

Twitter: dmbproduction
Playbook App: Food Journal
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: SQLite filetypes

It's the "command shell" utility found in the downloads page: http://sqlite.org/download.html

Let's you open up a .db file and manipulate it using raw SQL commands, and some related tools. If the .sql file you have consists of raw SQL statements, it may have been built using this tool (assuming you didn't build it yourself), and it may be possible to feed it to this tool using something like the -init option.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 53
Registered: ‎02-22-2011
My Device: Blackberry Torch 9800

Re: SQLite filetypes

Thanks Peter... What I ended up doing was open the SQLite file DB fille I had in RazorSQL which provided me with the SQLite commands, then using the comand line interface created a new <filename>.db file using the create table from the RazorSQL, once the new db file was create I then opened it using the free Firefox plug in and ran the rest of the SQL comands provided by RazorSQL to populate the table.

David

Twitter: dmbproduction
Playbook App: Food Journal