Solved

How is the actual database created?

Posted on 2011-03-07
2
357 Views
Last Modified: 2012-05-11
I have this code (below)... my question is: if the database file does NOT exist, which one of these statements creates it?  (not the tables, but the actual file 'r64.sdb')  Is it the SQLiteConnection statement?
dbPath = Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments);
	        db = Path.Combine (dbPath, "r64.sdb");
	        
			bool exists = File.Exists (db);  //  check to make sure it exists
			
			conn = new SqliteConnection("Data Source=" + db);

Open in new window

0
Comment
Question by:rmmarsh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
CHutchins earned 500 total points
ID: 35062877
It has to be making a call to another script to create the file from what I can tell form the last line.
the last line looks like a Connection creation and data source - + db is making a call to a variable
0
 

Author Closing Comment

by:rmmarsh
ID: 35063180
By trial and error I figured it out... conn.Open creates the database, based on the contents of db.  Thanks for your help... I appreciate it.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question