0

Hello!

I wonder how and where can I see a sqlite database that i have created in c++, if it is possible at all? I would like to see if the db exist, and what are the inputs, to check if i have inserted valuations properly..

Thank you.

T :)

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Tajna
0

1) check to see if db exists? That would be like checking if any other file exists, e.g. attempt to open it and if open failes then the db does not exist.

2) write a query to get all results, e.g. "SELECT * FROM MyTable" then view the results returned.

0

1.) i used:

fopen ("newdb", "r+");

to open it, I wasnt notified about any error. It doesn't really open a new window consisted of my db, does it?

I'm really new att all this, I feel like I'm totally lost :S


2) should i type "SELECT * FROM MyTable" into sqlite.exe command line or as a code in c++ by using sqlite_exec ?

0

>>to open it, I wasnt notified about any error.

FILE* fp = fopen(("newdb", "r+");
if( fp == NULL)
{
   cout << "Error opening db\n";
}

>>It doesn't really open a new window consisted of my db, does it?
No, that has nothing to do with windows. If you want a new window then you will have to create it yourself. google for win32 api tutorials.

2) I don't know what sqlite.exe is. See this short tutorial I wrote. Beyond that, you should probably join their forums to ask tech questions about sqlite.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.