| |
Customer
I love MDBSecure--it was a great purchase for me. However, once
the Database is locked down, I have troubles doing advanced stuff with
it. I would like to be able to modify the QueryDefs in
the database after it has been "MDBSecured." For example, when I
update the frontend program (written in C#.NET) and I need the backend
database to be updated. So let's say when my frontend
program starts up, I want to detect whether or not a QueryDef is in the
MDB file, and if it does not exist, create it. As near as I can
tell, QueryDefs can only be manipulated using ADOX and DAO COM
libraries when using VS.NET. Is this correct?
Since I'm using an OleDBConnection to the database, is it possible to
build an ADOX connection string which uses my passwords, etc., that
MDBSecure provides? I'm trying to make a function that will create a QueryDef for me.... here's the pseudo code. public bool CreateQuery( string qryName, string qrySQL ) { bool retVal = true; ADOX.Catalog cat; try { cat = new ADOX.CatalogClass(); cat.ActiveConnection = this.Connection; // The class's OleDbConnection object cat.Procedures.Append( qryName, qrySQL ); } catch (Exception ex) { Console.WriteLine( ex.Message ); retVal = false; } return retVal; }
|
Support
To be honest MDBSecure is a spin off program, I wrote the basic
functionality for another program. I create a secure database and
add tables. I use ADOX to create tables. Here's the sort of thing I do Code: Dim tblADOXTopics As ADOX.Table = New ADOX.Table() Dim tblADOTopicCodeIdx As New ADOX.Index() NewDB.ActiveConnection = lcnn1 With tblADOXTopics .Name = "Topics" .Columns.Append("TopicCode", DataTypeEnum.adVarWChar, 13) tblADOTopicCodeIdx.Name = "TopicCode" tblADOTopicCodeIdx.Columns.Append("TopicCode") tblADOTopicCodeIdx.Unique = True tblADOXTopics.Indexes.Append(tblADOTopicCodeIdx) .Columns.Append("Level", DataTypeEnum.adInteger) End With NewDB.Tables.Append(tblADOXTopics) |
|
However, I would use standard SQL for creating database objects.
That way you can easily use them if you upsize to a SQL Server
database. e.g. Code:
Create Table CustomReports (CRID COUNTER, CustRepName char(50),
ReportSQL Memo, Type Char(20), SysDB char(10), SequenceNum Long, Locked
YesNo, InUse YesNo) ALTER TABLE CustAccounts ADD COLUMN EMail text(50); |
|
I used ADO not ADO.Net so I'm not sure about the connection string.
However, I would imagine you'd be able to use a Jet connection
string??
|
|