473,387 Members | 1,455 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,387 software developers and data experts.

Relink Access Pass-Through Query's with VB.NET

Hi,

I need to relink a whole bunch of Access-Linked-Tables and
Pass-Through-Query's to another ODBC with VB.NET

I foudn alreaddy how to relink the Tables, and I thought the query's woudl
be likewise, but I just can't find how to do it.

For the tables this works:

Dim ADOConnection As New ADODB.Connection
Dim cat As New ADOX.Catalog
Dim tbl As New ADOX.Table

ADOConnection.Open("Provider=Microsoft.Jet.OLEDB.4 .0;Data
Source=" & strDirFile)

cat.ActiveConnection = ADOConnection

For Each tbl In cat.Tables
If tbl.Type = "PASS-THROUGH" Then
If UCase(Left(tbl.Properties("Jet OLEDB:Link Provider
String").Value(), intLen)) = UCase(strOld) Then
tbl.Properties("Jet OLEDB:Link Provider
String").Value() = strConn
End If
End If
Next
So if onybody knows how to do the same thing for the query's, please let me
know! I just spend alreaddy too many time on this, hehe.

Thanks a lot in advance!

Pieter
Nov 20 '05 #1
0 1694

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

Similar topics

0
by: Michele Simionato | last post by:
Here is a hack to implement attribute access (say for a Web framework) the way I always wanted it to be. I say "hack" since it uses sys._getframe and it sets the locals of a class, which is not...
3
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked...
16
by: Terry | last post by:
Hello, I am designing a form and need to know how to get a Check Box(PASS)to automatically update when the data in a Text Box (MARK), in the same form, is >=24. Using the Event dialogue box for...
1
by: sparks | last post by:
At first I thought I could just delete the tables and import the tables. BUT my tables have relationships and I can not delete a table with relations. So that only deleted the non relational tables...
3
by: Jim | last post by:
I have a database with a front and back end setup as follows: Front: \\nt\database\NewDB\Stats.mdb = forms, reports, queries Back: "\\nt\database\NewDB\StatsData.mdb" = tables When the...
12
by: lesperancer | last post by:
I've got two MDBs, that due to size, security, etc, need to be kept separate quotation configurator (there will be more of these in the future) so within quotation.mdb, I linked all the...
12
by: David Isaac | last post by:
Is it expected for access to set elements to be much slower than access to list elements? Explanation? Thanks, Alan Isaac 9.806250235714316 3.9823075279120701
2
by: Dan M | last post by:
I just learned that the version of OpenSSL I'm running (on a RedHat EL) server has some vulnerabilities that I'd like to close. I'm running PHP 5.1.4. My question is this: I've got PHP 5.1.4, and...
1
by: tobynegus | last post by:
I have a access 2000 database (currently running jet3.6) that has linked TXT and CSV files I need to be able to move the location of the database often, the linked data will always be in the same...
2
by: tobynegus | last post by:
I am trying to relink to existing linked csv and txt files, although the location may be different it is always realtive to the mdb file I have tried using the following code (GetPath returns the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.