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

How to judge whether Microsoft Text Driver Exist programmatically?

Thanks.
Jul 21 '05 #1
3 3832
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
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
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
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
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
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
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
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
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 =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.