Wolfie7873
Technical User
Trying to find a simple snippet to create a database from within a program.
I'm relatively new to databases, but i'm picking up fast. I know all of the basic SQL commands and how to implement them once I have an open connection to an existing database, but what I would like is something like this:
CREATE_DBV4=<user defined path>;
OleDbConnection * cnDirector = new OleDbConnection;
cnDirector->ConnectionString =
S" Provider=Microsoft.Jet.OLEDB.4.0;"
S"Data Source=<path>";
cnDirector->Open();
OleDbCommand * cmDirector = new OleDbCommand(S"CREATE TABLE <etc>",cnDirector);
and continue from there. I don't quite get how/where the first CREATE command works. Where exactly does it go in relation to the connection directive?
Thanks in advance...
I'm relatively new to databases, but i'm picking up fast. I know all of the basic SQL commands and how to implement them once I have an open connection to an existing database, but what I would like is something like this:
CREATE_DBV4=<user defined path>;
OleDbConnection * cnDirector = new OleDbConnection;
cnDirector->ConnectionString =
S" Provider=Microsoft.Jet.OLEDB.4.0;"
S"Data Source=<path>";
cnDirector->Open();
OleDbCommand * cmDirector = new OleDbCommand(S"CREATE TABLE <etc>",cnDirector);
and continue from there. I don't quite get how/where the first CREATE command works. Where exactly does it go in relation to the connection directive?
Thanks in advance...