[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Robert Hooker

10/11/2006 4:06:00 PM

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



7 Answers

Mythran

10/11/2006 4:37:00 PM

0


"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


Robert Hooker

10/11/2006 5:38:00 PM

0

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
>
>
>


Cindy Winegarden

10/11/2006 8:53:00 PM

0

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.


Cindy Winegarden

10/11/2006 9:08:00 PM

0

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)?


v-kevy

10/12/2006 2:54:00 AM

0

Hi Robert,

Since the connection cannot be opened, the most probability is there might
be something wrong with the FoxPro driver for ODBC.

Currently Windows Vista is in beta versions, the development on this
platform is not supported. You can try to post this in the Windows Vista
development forum.

http://forums.microsoft.com/MSDN/default.aspx?forumgroupid=24&am...

Kevin Yu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default....
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/de....
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

mayank mishra

11/9/2006 2:00:00 PM

0


hi
hello i am creating asp.net with c# app in which we retive data from or
select data from foxpro2.6 dbf and update the data using ms access query
in c# but update not work error generate like "operation updation use"
sir please help me

using System.Data.Odbc;


string str1="abc";
string str=@"Driver={Microsoft dBASE
Driver(*.dbf)};DriverID=277;Dbq=e:\medicell\comp0009;";
OdbcConnection con=newOdbcConnection(str);
con.Open();
OdbcCommand cmd=new OdbcCommand("update acbal set name2=@name2",con);

cmd.Parameters.Add("@name2",str1);
cmd.ExecuteNonQuery();
cmd.Dispose();
con.Close();
Response.Write("Update");

*** Sent via Developersdex http://www.develop... ***

Cindy Winegarden

11/9/2006 7:28:00 PM

0

Hi Mayank,

Download and install the FoxPro and Visual FoxPro OLE DB data provider from
msdn.microsoft.com/vfoxpro/downloads/updates. It''s backward compatible to
all versions of FoxPro DBFs.

The following code worked for me:

OleDbParameter parm1 = new OleDbParameter("parm1", OleDbType.Char);
parm1.Value = "abc";

string str = @"Provider=VFPOLEDB.1;Data Source=C:\Temp;";
OleDbConnection con = new OleDbConnection(str);
con.Open();

OleDbCommand cmd = new OleDbCommand("update acbal set name2=?", con);

cmd.Parameters.Add(parm1);
cmd.ExecuteNonQuery();
cmd.Dispose();
con.Close();

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


"mayank mishra" <lucky13980@yahoo.co.in> wrote in message
news:ucRGZdABHHA.1012@TK2MSFTNGP04.phx.gbl...
>
> hi
> hello i am creating asp.net with c# app in which we retive data from or
> select data from foxpro2.6 dbf and update the data using ms access query
> in c# but update not work error generate like "operation updation use"
> sir please help me
>
> using System.Data.Odbc;
>
>
> string str1="abc";
> string str=@"Driver={Microsoft dBASE
> Driver(*.dbf)};DriverID=277;Dbq=e:\medicell\comp0009;";
> OdbcConnection con=newOdbcConnection(str);
> con.Open();
> OdbcCommand cmd=new OdbcCommand("update acbal set name2=@name2",con);
>
> cmd.Parameters.Add("@name2",str1);
> cmd.ExecuteNonQuery();
> cmd.Dispose();
> con.Close();