473,486 Members | 2,340 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to judge whether Microsoft Text Driver Exist programmatically?

Thanks.
Jul 21 '05 #1
3 3839
text driver for what? for data?

Maybe you could just
- create an OleDbConnection
- call Open() on that connection
- surround those calls with a try...catch

-Dino

"idiot" <ze******@21cn.com> wrote in message
news:e6**************@TK2MSFTNGP09.phx.gbl...
Thanks.

Jul 21 '05 #2
Thank you reply.
How can I get the version of Microsoft Text Driver? Is it same to the
version of ODBCJT32.dll?
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> дÈëÏûÏ¢ÐÂÎÅ
:#C**************@TK2MSFTNGP11.phx.gbl...
text driver for what? for data?

Maybe you could just
- create an OleDbConnection
- call Open() on that connection
- surround those calls with a try...catch

-Dino

"idiot" <ze******@21cn.com> wrote in message
news:e6**************@TK2MSFTNGP09.phx.gbl...
Thanks.


Jul 21 '05 #3
On Tue, 30 Sep 2003 09:58:42 +0800, "idiot" <ze******@21cn.com> wrote:

¤ Thank you reply.
¤ How can I get the version of Microsoft Text Driver? Is it same to the
¤ version of ODBCJT32.dll?
¤

The Text driver is mstext40.dll if you are using Jet 4.0. It's in the Windows System or System32
folder depending upon the version of Windows you are using. You can use the Registry library to
retrieve the path:

Dim Key As Microsoft.Win32.RegistryKey

Try
'Open the registry key.
Key =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(" Software\Microsoft\Jet\4.0\Engines\Text", True)
If Key Is Nothing Then 'if the key doesn't exist
Throw New Exception("The registry key doesn't exist")
End If

'Get the value.
Dim TextDriverPath As String
TextDriverPath = Key.GetValue("Win32")

Console.WriteLine("Value:{0} for {1} has been successfully retrieved.", TextDriverPath,
"Win32")
Catch e As Exception
Console.WriteLine("Error occurred reading registry" & e.Message)
End Try

You can go one step further and use the System.IO.Directory class (Exists method) to see if the file
is actually present.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #4

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

Similar topics

8
2514
by: Tux | last post by:
Is it possible and does someone try to make driver for Linux in Java, for some USB device? Could Java do that ? I saw jUSB package but it seems that works only with the devices which Linux...
1
1923
by: Rahul Apte | last post by:
How do I programmatically check whether ASP and Server Side Includes sub-components of the World Wide Web service are installed on a Windows 2003 Box? I want to do these checks as pre-install...
6
4572
by: mark4asp | last post by:
Hello, Is there a simple way to check whether a database driver is available on a remote server? I only have ftp access so I can only run ASP scripts. An ASP application on a host has...
58
4609
by: Jeff_Relf | last post by:
Hi Tom, You showed: << private const string PHONE_LIST = "495.1000__424.1111___(206)564-5555_1.800.325.3333"; static void Main( string args ) { foreach (string phoneNumber in Regex.Split...
1
2631
by: sword | last post by:
This my first starting a new topic in English. I want to ask if I want to judge whether a file exists how I should do. I program with C++. Thank you.
6
2240
by: Morgan Cheng | last post by:
I know that HttpWebRequest.GetResponse() generates a HttpWebResonse. The response has one ContentType property. But the property is just decided by http response header. It is possible that the...
2
2006
by: zacks | last post by:
I have an application that uses the Microsoft Text Driver to read ASCII delimited files. Most of the time these files are either CSV or TXT file extension. Recently I needed to read some that had a...
26
1804
by: momobear | last post by:
hi, I am puzzled about how to determine whether an object is initilized in one class, anyone could give me any instructions? here is an example code: class coffee: def boil(self): self.temp =...
0
7099
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
6964
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
7123
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
7175
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...
1
4864
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...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.