Solved

How is the actual database created?

Posted on 2011-03-07
2
354 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
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

828 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