accessing Access 2007 System Object tables and schemas - vb.net

I am looking for some help on retrieving Access 2007 database schema information for system object tables. I have reviewed, read and tested this successfully for the non system tables. The database tables info I am trying to retrieve are in the tables that begin with MSys{xxxxxxxxxx} and store things like relationships, creation date, dateupdate, etc. This tables are viewable by right clicking on the Navigation Options popup menu in Access and selecting Show System Objects.
For clarification, I have added the System.mdw database to the connection string, and I have attempted multiple settings in the restrictions property of the getSchema method. I am using ado.net, vb.net, and VS2008, these are access 2007 databases not mdb files.
My issue appears to continue to be no read access to the System tables. My end goal is to manage relationships initially and eventually hopefully script these databases much like can be done EASILY (Microsoft) in SQL Server Mgmt Studio.
I am hoping someone can point me to some good web link resources or even a good book that clearly discusses this functionality.
thanks,

As it turns out the easiest way to gain access to the system table data is to execute a permissions command on the Systems database table(s). The following query did the trick....
Dim strDdl As String = "GRANT SELECT ON MSysObjects TO Admin;"
Dim command12 As New OleDbCommand(strDdl, connection)

Related

Microsoft SQL Server connection error with Visual Studio.net (Windows forms)

I've been trying for a while to connect the database to visualstudio.net and it just doesn't work.
First I made the database and made everything I needed there and when I tried connecting it in visual.net through datagridview (trying to get it displayed there) it only gives me access to the "System databases" in which I can't make a database.
After that I decided to make the tables under the "master" database to see if that worked and yeah I can select the database and everything but it says it's empty when I know it's not. It says it has no tables when I've checked multiple times and saw the tables I've created there.
I would appreciate some help to either be able to get for visual to accept a database I make (to be able to automatically detect it once I enter the server name) or to see how can I use the master one properly.
You can add a data source to your project and it will be able to connect to the user databases. Also, it is highly inadvisable to create any user objects in the master database.
master database is a system database and you should not create user objects in the system database. In the connection string, provide the user database name explicitly. If you dont provide the database name, it defaults to master database.
Refer to connection strings for Sql Server for providing the right connection string for SQL Server in .net.

redirecting existing Access forms to SQL Server

In our organisation, we have Sales Database in Access. The Access database has few forms and few reports. Over time, the Access database has grown. Retrieving records via forms has become slow and cumbersome.
We have decided to divide the migration two phase – short term and long term. In short term, we want to migrate the Access database to the SQL Server and leave the forms and reports in Access as it is. I have to link the forms and reports to the SQL Server tables.
I have successfully migrated the Access database to SQL SERVER using migration assistant tool. I am stuck at changing the forms to talk to the SQL Server.
My question is –
Is it possible to change the existing access form to talk to SQL SERVER?
If the above answer is wrong, what are other method I can use to achieve the same objective?
Your help is much appreciated.
I belive you can do it by creating "linked tables" with the same name as the original tables.
I've done it using ODBC in the "External Data" on the menu bar, chose "ODBC Database", and then "Link to DataSource, and create linked tables".
When the wizard is finished "it's pretty much forward", just change the table names to the original table names, and the forms should work as "nothing had changed".

Can't access ODBC data source from Matlab's Database Toolbox

I use Matlab's Database Toolbox to extract data from a SQL Server database. Today the database admin created a new table, but I can't seem to access it. The new table contains a schema called dbo, and when I try to access it using Matlab's querybuilder tool, the tool gives the following error:
Unable to get table information from data source
I can access other tables in the database without a problem. Any idea what is causing this problem? I don't have enough familiarity with SQL to diagnose it.
Have the admin check that this new table has the same permissions and attributes of a table that you know is working. If the permissions are messed up, you would not be able to retrieve metadata about it.

Accessing Content from MDF after attached to SQL

I am using WSS 3.0 and trying to restore a mdf. I attached the database in SQL Management Studio, created a new web application, and associated the database to it. When I go into Central Administration-> Application Management -> Content Databases I see the WSS_Content and it says Sites: 2. One of the sites looks more similar to the other. I was able to log into the Sharepoint web app that has the db attached to it, and while it gives me the basic structure of the backed up site, the content of lists is blank, that was the data I was really after (Announcements, tasks, etc exist as lists but are empty). How do I get access to this?
Kindly remove your old database and make newly added database as a default/only database for your webapplication
I'd link to the the data from SQL Server into an Access database.. and then use MS Access to write these values back into sharepoint.
I've written a LOT of data to sharepoint using MS Access.. and I love the functionality.
the data is in SQL server.. but it's got different guids, or it's not wired up from what I'd assume.
You have the data posted to the SQL Server instance.. I'd just link to it in MS Access, write a couple of queries.. recreate a couple of lists.. and then push it from queries based on Access linked tables (to sql server).. and then jam it into Access linked tables (to sharepoint).
Open Access. right-click link basically. times two. and write a couple of queries.
If it was me, and it was just a couple of lists, I'd do this in a couple of minutes I swear.

Create Access databases programatically through vb.net

Let me preface this by saying that I know this is a stupid way to go about this, but it needs to be handled in this way.
I need to make an application that from a master database creates a number of access database files (tables of a larger db), then these are manually given to users who fill in data, the database files are emailed back to a user who, through the application, combines them again.
The only part of this that I am unsure about is problematically creating the access db's. I have read that through Microsoft Jet OLE DB Provider and Microsoft ADO Ext I can create them (the tables and data), but I also need forms.
I have yet to start writing anything and this is away from my area of work, so any insight/links would be much appreciated.
Also, I would hope to be able to write this in the free express version of visual studio. Are there components needed that would prevent me from this? Thanks.
If you are developing in vb.net then why do you need forms in the Access database? Create a vb.net application for the "client" pcs with the required forms reading and writing to the Access database.
If however you do need to have forms in an Access database. Create a database with the required forms and code. Distribute the code/form database and the data database. Add a method to the code/form database the creates links to the tables in the "data" database.