Windows Vista Forums
Vista Forums Home Join Vista Forums Tech Publications Windows 7 Forum Vista Tutorials Webcasts Tags

Welcome to Vista Forums we are your forum for Windows Vista help and discussion. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Vista Newsgroups > Vista General

ODBC / Vista / Foxpro

Update your Vista Drivers
Reply
 
Thread Tools Display Modes
Old 10-11-2006   #1 (permalink)
Robert Hooker
Guest


 

ODBC / Vista / Foxpro

I have installed our .NET application on a system running Microsoft Windows
Vista operating system.

When I run our application, I receive the following error message whenever
it tries to create a DBF file using VFPODBC:
"ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support this
function"

I am using a connection string that I have used for many years with no
problems, here is some sample C# code:

try
{
string connectionStatement = "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDb=C:\\temp";
string createTableStatement = "CREATE TABLE [c:\\temp\\test] FREE(field1
C(10), field2 C(10), field3 C(10))";

OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
dbConnection.Open();

OdbcCommand createCmd = new OdbcCommand(createTableStatement,
dbConnection);
createCmd.ExecuteNonQuery(); <<<< Fails here with the
message above >>>>
}
catch( System.Exception e )
{
MessageBox.Show(e.Message, "Error Creating Report Table"
,MessageBoxButtons.OK, MessageBoxIcon.Error);
}


How can I get my program to work in Vista (32 and 64bit)?
Rob




My System SpecsSystem Spec
Old 10-11-2006   #2 (permalink)
Mythran
Guest


 

Re: ODBC / Vista / Foxpro


"Robert Hooker" <rhooker@noemail.noemail> wrote in message
news:OG3ny8U7GHA.4552@TK2MSFTNGP05.phx.gbl...
>I have installed our .NET application on a system running Microsoft Windows
>Vista operating system.
>
> When I run our application, I receive the following error message whenever
> it tries to create a DBF file using VFPODBC:
> "ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
> this function"
>
> I am using a connection string that I have used for many years with no
> problems, here is some sample C# code:
>
> try
> {
> string connectionStatement = "Driver={Microsoft Visual FoxPro
> Driver};SourceType=DBF;SourceDb=C:\\temp";
> string createTableStatement = "CREATE TABLE [c:\\temp\\test] FREE(field1
> C(10), field2 C(10), field3 C(10))";
>
> OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
> dbConnection.Open();
>
> OdbcCommand createCmd = new OdbcCommand(createTableStatement,
> dbConnection);
> createCmd.ExecuteNonQuery(); <<<< Fails here with the
> message above >>>>
> }
> catch( System.Exception e )
> {
> MessageBox.Show(e.Message, "Error Creating Report Table"
> ,MessageBoxButtons.OK, MessageBoxIcon.Error);
> }
>
>
> How can I get my program to work in Vista (32 and 64bit)?
> Rob
>
>
>


You could try:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<path>;Extended
Properties=dBASE IV;User ID=Admin;Password="

as the connection string and use OleDb instead of ODBC.

HTH,
Mythran


My System SpecsSystem Spec
Old 10-11-2006   #3 (permalink)
Robert Hooker
Guest


 

Re: ODBC / Vista / Foxpro

Small correction:

It actually fails here:
dbConnection.Open();


"Robert Hooker" <rhooker@noemail.noemail> wrote in message
news:OG3ny8U7GHA.4552@TK2MSFTNGP05.phx.gbl...
>I have installed our .NET application on a system running Microsoft Windows
>Vista operating system.
>
> When I run our application, I receive the following error message whenever
> it tries to create a DBF file using VFPODBC:
> "ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
> this function"
>
> I am using a connection string that I have used for many years with no
> problems, here is some sample C# code:
>
> try
> {
> string connectionStatement = "Driver={Microsoft Visual FoxPro
> Driver};SourceType=DBF;SourceDb=C:\\temp";
> string createTableStatement = "CREATE TABLE [c:\\temp\\test] FREE(field1
> C(10), field2 C(10), field3 C(10))";
>
> OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
> dbConnection.Open();
>
> OdbcCommand createCmd = new OdbcCommand(createTableStatement,
> dbConnection);
> createCmd.ExecuteNonQuery(); <<<< Fails here with the
> message above >>>>
> }
> catch( System.Exception e )
> {
> MessageBox.Show(e.Message, "Error Creating Report Table"
> ,MessageBoxButtons.OK, MessageBoxIcon.Error);
> }
>
>
> How can I get my program to work in Vista (32 and 64bit)?
> Rob
>
>
>



My System SpecsSystem Spec
Old 10-11-2006   #4 (permalink)
Cindy Winegarden
Guest


 

Re: ODBC / Vista / Foxpro

Hi Mythran,

For the record, not all DBFs are compatible with the dBase driver. FoxPro
DBFs created with VFP3-6 may be accessed via the FoxPro and Visual FoxPro
ODBC drivers, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates/odbc, and also DBFs that are
created with VFP7-9 if they don't use any of the new data features added in
VFP7 and above.

All versions of FoxPro DBFs are accessible via the FoxPro and Visual FoxPro
OLE DB data provider, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates .


--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@cindywinegarden.com


"Mythran" <kip_potter@hotmail.com> wrote in message
news:emtRpNV7GHA.4348@TK2MSFTNGP03.phx.gbl...
>
> "Robert Hooker" <rhooker@noemail.noemail> wrote in message
> news:OG3ny8U7GHA.4552@TK2MSFTNGP05.phx.gbl...


> You could try:
>
> "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=<path>;Extended
> Properties=dBASE IV;User ID=Admin;Password="
>
> as the connection string and use OleDb instead of ODBC.



My System SpecsSystem Spec
Old 10-11-2006   #5 (permalink)
Cindy Winegarden
Guest


 

Re: ODBC / Vista / Foxpro

Hi Robert,

Have you tried the FoxPro and Visual FoxPro OLE DB data provider,
downloadable from msdn.microsoft.com/vfoxpro/downloads/updates ? A typical
OLE DB data provider connection string (in VB) looks like:

connString = "Provider = VFPOLEDB.1; Data Source = C:\Temp;"

You can only work with Visual FoxPro ODBC or OLE DB in a 64-bit environment
in compatibility mode. There are no plans to create a 64-bit FoxPro ODBC
driver or OLD DB data provider. I'm told there will, however, be a .NET data
provider for FoxPro.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
cindy@cindywinegarden.com


"Robert Hooker" <rhooker@noemail.noemail> wrote in message
news:ONrcPwV7GHA.4476@TK2MSFTNGP04.phx.gbl...

> It actually fails here:
> dbConnection.Open();


>> "ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
>> this function"


>> try
>> {
>> string connectionStatement = "Driver={Microsoft Visual FoxPro
>> Driver};SourceType=DBF;SourceDb=C:\\temp";
>> string createTableStatement = "CREATE TABLE [c:\\temp\\test]
>> FREE(field1 C(10), field2 C(10), field3 C(10))";
>>
>> OdbcConnection dbConnection = new OdbcConnection(connectionStatement);
>> dbConnection.Open();


>> How can I get my program to work in Vista (32 and 64bit)?



My System SpecsSystem Spec
Reply
Update your Vista Drivers

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dos Based Foxpro 2.6 not load on Net Work drive of Vista Business VMP Vista General 0 04-14-2008 02:32 AM
Cannot connect to FoxPro database in Vista, IIS 7 tucnak General Discussion 0 01-02-2008 04:48 PM
FoxPro ODBC tucnak Vista General 0 01-01-2008 11:26 AM
ms dos foxpro 2.6a (X) will work ? NITHIYANANDAN M R Vista General 8 03-17-2007 07:28 PM
I have a problem creating a ODBC connection to a Foxpro Database!! John C. Hill Vista file management 9 09-26-2006 03:02 PM


Complimentary Industry Resources

Vista Forums has joined forces with TradePub.com to offer you a new, exciting, and entirely free professional resource. Visit http://vistax64.tradepub.com today to browse our selection of complimentary Industry magazines, white papers, webinars, podcasts, and more across 34 industry sectors. No credit cards, coupons, or promo codes required. Try it today!




Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51