473,405 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Using GetOleDbSchemaTable and Visual Basic .NET for MS-Access and SQL Server Express

I need to write a VB.Net application that will take an mdb file (Access
2000) and create corresponding copy of it in SQL Express, creating all
the tables and relationships, and transferring over the data (using an
existing application like DTS in SQL Server or something else is NOT an
option - this must be coded from scratch). The Access databases that it
must be able to handle will only have tables, relationships, and data
(i.e. no forms, macros, queries, reports). I see that in the
System.Data.OleDb namespace there is the method GetOleDbSchemaTable
that returns all sorts of schema information. I haven't fully explored
how to use this method, but do you think I will be able to pull out all
that I need from the various schema information returned to rebuilt the
mdb file in SQL Express? I just don't want to start heading down this
road and invest quite a bit of effort only to hit an impassable road
block.

Thank you for any thoughts on this!

Marcus

Feb 11 '06 #1
7 2439
I don't know of any gotchas with using GetOleDbSchemaTable to roll your own
upsizing tool. However, you'll need to come up with your own Access to SQL
Server data type mappings.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Marcus" <ho**********@hotmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I need to write a VB.Net application that will take an mdb file (Access
2000) and create corresponding copy of it in SQL Express, creating all
the tables and relationships, and transferring over the data (using an
existing application like DTS in SQL Server or something else is NOT an
option - this must be coded from scratch). The Access databases that it
must be able to handle will only have tables, relationships, and data
(i.e. no forms, macros, queries, reports). I see that in the
System.Data.OleDb namespace there is the method GetOleDbSchemaTable
that returns all sorts of schema information. I haven't fully explored
how to use this method, but do you think I will be able to pull out all
that I need from the various schema information returned to rebuilt the
mdb file in SQL Express? I just don't want to start heading down this
road and invest quite a bit of effort only to hit an impassable road
block.

Thank you for any thoughts on this!

Marcus

Feb 12 '06 #2
I am in the middle of the same dilema now :) . Actually I will just
start my own thorough tests with GetOleDbSchemaTable() to see the
results. Until now I read good references about this method and my only
test until now (retrieving the list of tables) worked well on SQL
Server and ORACLE.
I propose you to keep each other in touch in order to share the test
results, ok? :)

Deck

Feb 13 '06 #3
Here is a pointer to a (free) application which can be of help in this
preliminary stage.

It will download and show the entire DB structure (tables, links,
passthroughs, relationships,...), by querying through
GetOleDbSchemaTable.

It will display contents of all the OleDbSchemaGuids.

It has functionalities to reload data from Access to SQL server.

It shows data type mappings mapping and allows changing it at reload
time.

It's possible to ask (free) for new functionalities to solve your
problems.

http://151.100.3.84/technicalpreview/

Feb 13 '06 #4
Sounds good, Deck. I'll post back here with anything that might be
useful.

Cheers,
Marcus

Feb 13 '06 #5
Excellent. That is ceratinly a useful tool for exploring what is schema
info is available via GetOleDbSchemaTable.

Thanks!
Marcus

Feb 13 '06 #6
If Ms-Acess is installed then one could automate it, create an ADP,
attach the ADP to the SQL-Server and create the new SQL DB with
DoCmd.TransferDatabase. I guess the whole thing would be fewer than ten
lines of simple code.

If Ms-Access is not part of the solution then ... why CDMA?

Feb 13 '06 #7
Here is a project that someone put together in C# that reads the
schema from an Access database using GetOleDbSchemaTable() and creates
the SQL to regenerate it. I think this will be very useful for my
needs:

http://www.codeproject.com/csharp/sq...&select=599515

Marcus

Feb 15 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Aaron | last post by:
Is it possible to use .net framework 1.1 in vs2005? where can i find a list of new features of .net framework 2.0? thanks
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
6
by: Chris Lane | last post by:
Hi, I have been searching for a possible list that shows what methods or properties in the System Names replace the ones in the Visual Basic Namespace so I can stop using the Visual Basic...
4
by: junaidnaseer | last post by:
Hi ! I am facing a problem that I have defined a function which when called in the same file generates an error as follows; " visual c error C2371 redefinition basic types see...
7
by: luvwknd | last post by:
Hi all, I am attempting to utilize MS's article I.D. #828993 found at: http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B828993 In an effort to create a GUI Ping utility that...
5
by: genojoe | last post by:
This line of code works fine if I know the name of the Sheet Dim ExportCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO . FROM ", ExcelConnection) Also, I have seen code samples...
4
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a...
6
by: Carol | last post by:
Hi. When I try to run Visual Studio 2003 I get the message "MS development environment is not installed for the current user. Please run setup to install the application." Is there any way to...
17
by: Sven Rutten | last post by:
Hello Actually I want to add some C#-Code to a VB.NET-Project in VS 2005. Normally I creating a DLL and importing that from the VB-Project. But as I am coding something for a Smart Device...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.