Technology Questions

Go Back   Technology Questions > Software Questions > Operating System Questions > Vista Community > Windows Vista

Windows Vista Discuss the different versions of Windows Vista, Fuji, or Vienna



Reply
 
LinkBack Thread Tools
  #1  
Old 01-01-2007, 08:36 PM
Robert Hooker
Newsgroup Contributor
 
Posts: n/a
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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 01-01-2007, 08:36 PM
  #2  
Old 01-01-2007, 08:36 PM
Mythran
Newsgroup Contributor
 
Posts: n/a
Re: ODBC / Vista / Foxpro


"Robert Hooker" <rhooker@noemail.noemail> wrote in message
news:OG3ny8U7GHA.4552@TK2MSFTNGP05.phx.gbl...[color=blue]
>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
>
>
>[/color]

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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3  
Old 01-01-2007, 08:36 PM
Robert Hooker
Newsgroup Contributor
 
Posts: n/a
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...[color=blue]
>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
>
>
>[/color]


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #4  
Old 01-01-2007, 08:37 PM
Cindy Winegarden
Newsgroup Contributor
 
Posts: n/a
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
[email]cindy@cindywinegarden.com[/email]


"Mythran" <kip_potter********.com> wrote in message
news:emtRpNV7GHA.4348@TK2MSFTNGP03.phx.gbl...[color=blue]
>
> "Robert Hooker" <rhooker@noemail.noemail> wrote in message
> news:OG3ny8U7GHA.4552@TK2MSFTNGP05.phx.gbl...[/color]
[color=blue]
> 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.[/color]


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #5  
Old 01-01-2007, 08:37 PM
Cindy Winegarden
Newsgroup Contributor
 
Posts: n/a
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
[email]cindy@cindywinegarden.com[/email]


"Robert Hooker" <rhooker@noemail.noemail> wrote in message
news:ONrcPwV7GHA.4476@TK2MSFTNGP04.phx.gbl...
[color=blue]
> It actually fails here:
> dbConnection.Open();[/color]
[color=blue][color=green]
>> "ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support
>> this function"[/color][/color]
[color=blue][color=green]
>> 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();[/color][/color]
[color=blue][color=green]
>> How can I get my program to work in Vista (32 and 64bit)?[/color][/color]


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Off
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft Access ODBC Driver for Vista 64 bit Richard Windows Vista 5 06-29-2009 11:30 AM
Dos Based Foxpro 2.6 not load on Net Work drive of Vista Business VMP Windows Vista 0 04-13-2008 10:40 PM
Oracle ODBC driver and Vista magick Windows Vista 1 08-07-2007 03:10 PM
FoxPro App on a wireless PC D1Artagnan Windows XP 0 04-18-2007 02:30 PM
ms dos foxpro 2.6a (X) will work ? NITHIYANANDAN M R Windows Vista 8 03-17-2007 03:45 PM


New To Technology Questions? Do You Need Help with Your Computer or Device? Do You Need Help with this site?

All times are GMT -8. The time now is 03:24 PM.


2003 - 2010 All Rights Reserved. Technology Questions

Search Engine Friendly URLs by vBSEO 3.3.0