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

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

Oct 11 '06 #1
4 8424

"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:OG**************@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
Oct 11 '06 #2
Small correction:

It actually fails here:
dbConnection.Open();
"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:OG**************@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

Oct 11 '06 #3
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
ci***@cindywinegarden.com
"Mythran" <ki********@hotmail.comwrote in message
news:em**************@TK2MSFTNGP03.phx.gbl...
>
"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:OG**************@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.

Oct 11 '06 #4
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
ci***@cindywinegarden.com
"Robert Hooker" <rh*****@noemail.noemailwrote in message
news:ON**************@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)?

Oct 11 '06 #5

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

Similar topics

1
by: MLH | last post by:
I'm running XP. Is it required that a given ODBC driver be selected or set somehow as a default driver? Look at this... Here's the error: Error: ODBC call failed... Datasource not found and no...
1
by: Salad | last post by:
Hi: I am developing an application using FoxPro 2.x tables. My client has AccessXP. AccessXP uses Visual Foxpro ODBC to connect to tables. It does not accept the ISAM Foxpro driver used in A97....
0
by: Salad | last post by:
My operating system is WinXP Pro. I have 1 gig of memory and the chip is an Intel Pentium 4. I am using Access97. A table has been supplied to me from an external source createdc from Visual...
6
by: Jozef | last post by:
Hello, Is there any way to automatically create an ODBC data source if it doesn't already exist? I'd like to deploy this program on workstations that I may not have access to, and don't want...
1
by: GPBSOFT | last post by:
I am Italian developer, escuse me for my bad English I have a problem with ODBC. I must link to a database from Visual FoxPro, I have installed Windows XP Professional with service pack 2. When I...
8
by: smerf | last post by:
I haven't delved into the beast that is Vista from a programming standpoint yet. But, if the blog at http://west-wind.com/WebLog/posts/4983.aspx is any indication of what we're in for.....I say we...
4
by: Robert Hooker | last post by:
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...
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
3
by: Salad | last post by:
Is it the rule that any table that you want to use via ODBC must be a UNIQUE record? And if you want any speed associated with the table it should be indexed? I was having some difficulty...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
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
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,...

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.