orangutan

My scenario is this:

I have inherited a large access database, critical to a website. I need to do some work on the site which requires that I modify a number of tables and create a few ne querydef so support the work.

The obvious soluition is to ftp the db locally, modify the file and upload it. But If possible I do not want to do this. I don't want to lose data and I don't want to take the db offline.

So what I would like to do is create an aspx page which I can use to do operations like creae new querydefs. How can I connect to an access db to do these kind of operations As far as I can tell, the regular OleDbConn does not allow me to do these operations - rather I need to use the access object model.

I suspect there must be some utility out there on the internet to do this kind of thing (a bit like phpmyadmin). Does anyone know about this



Re: .NET Framework Data Access and Storage define a new querydef in an access db using asp.net

VMazur

Not sure if it will work for you, but you could use ALTER TABLE... and CREATE TABLE ... DDL statements to modify columns and tables in Access database, and you could execute those statements just as any regular SQL statements using OleDbCommand class (using ExecuteNonQuery method). If database located remotely, then you would need to create Web service that will execute your DDL statements and call Web service from some sort of client application






Re: .NET Framework Data Access and Storage define a new querydef in an access db using asp.net

Paul P Clement IV


Yes, you can use the CREATE VIEW and CREATE PROCEDURE Jet SQL statements to create Access QueryDefs. See the following for more information:

http://msdn2.microsoft.com/en-us/library/aa139977(office.10).aspx