The simplest connection string for MSDASQL and FoxPro's 2.5 dbf? 
Author Message
 The simplest connection string for MSDASQL and FoxPro's 2.5 dbf?

Hi netters, (Windows NT, VC++, ADO)

My question could be also stated: Where can I find
detailed information on MSDASQL-related
connection-string arguments?

My task is to access DFB files generated by FoxPro
version 2.5, i.e. the tables stored in separate
files. I am using ADO objects in a C++ program. After
some experiments, I have got the connection string
which works for me (line-breaks added):

  Provider=MSDASQL;
  Driver=Microsoft Visual FoxPro Driver;
  SourceType=DBF;
  SourceDB=c:\path\to\my\dbf\files;

Removing any of the items lead to an error which
makes me believe that it is a minimal connection
string for me.

After the connection was successfully opened, I
dumped out the connection string. Here is what I've
got (I did separate the items by line-breaks):

  Provider=MSDASQL.1;
  Connect Timeout=15;
  Extended Properties="Driver={Microsoft Visual FoxPro Driver};
                       UID=;
                       PWD=;
                       SourceDB=c:\path\to\my\dbf\files;
                       SourceType=DBF;
                       Exclusive=No;
                       BackgroundFetch=Yes;
                       Collate=;
                       Null=Yes;
                       Deleted=Yes;";
  Locale Identifier=1029

I understand it so that the other items were added as
default values. But what part of the system has done
it? Was it ADO, MSDASQL data provider, or what?

Where can I find more information about the meaning
of the connection-string items?

Thanks for any help,

Petr

--
Petr Prikryl, Skil s.r.o., e-mail: skil at stbk dot mcs dot cz
  Please, don't reply via e-mail as more people share the
  address. Do reply via net news.



Mon, 25 Mar 2002 03:00:00 GMT
 The simplest connection string for MSDASQL and FoxPro's 2.5 dbf?

Petr,

see comments inline...


Quote:
> Hi netters, (Windows NT, VC++, ADO)

> My question could be also stated: Where can I find
> detailed information on MSDASQL-related
> connection-string arguments?

ADO docs, OLEDB docs and ODBC docs which you can find on MSDN.

Quote:

> My task is to access DFB files generated by FoxPro
> version 2.5, i.e. the tables stored in separate
> files. I am using ADO objects in a C++ program. After
> some experiments, I have got the connection string
> which works for me (line-breaks added):

>   Provider=MSDASQL;
>   Driver=Microsoft Visual FoxPro Driver;
>   SourceType=DBF;
>   SourceDB=c:\path\to\my\dbf\files;

> Removing any of the items lead to an error which
> makes me believe that it is a minimal connection
> string for me.

> After the connection was successfully opened, I
> dumped out the connection string. Here is what I've
> got (I did separate the items by line-breaks):

>   Provider=MSDASQL.1;
>   Connect Timeout=15;
>   Extended Properties="Driver={Microsoft Visual FoxPro Driver};
>                        UID=;
>                        PWD=;
>                        SourceDB=c:\path\to\my\dbf\files;
>                        SourceType=DBF;
>                        Exclusive=No;
>                        BackgroundFetch=Yes;
>                        Collate=;
>                        Null=Yes;
>                        Deleted=Yes;";
>   Locale Identifier=1029

> I understand it so that the other items were added as
> default values. But what part of the system has done
> it? Was it ADO, MSDASQL data provider, or what?

The provider has its own defaults, like the Connection Timeout, the Extended
properties are extracted from the ODBC entry which in turn has some
defaults. Remember that MSDASQL is a OLEDB wrapping that uses ODBC.

Quote:
> Where can I find more information about the meaning
> of the connection-string items?

http://msdn.microsoft.com is a pretty good source, just search for keywords.
http://support.microsoft.com/support/kb/articles/Q167/4/05.ASP for the ODBC
FoxPro Driver
http://msdn.microsoft.com/library/sdkdoc/dasdk/msda0ipk.htm for Connection
String Syntax

Quote:

> Thanks for any help,

> Petr

> --
> Petr Prikryl, Skil s.r.o., e-mail: skil at stbk dot mcs dot cz
>   Please, don't reply via e-mail as more people share the
>   address. Do reply via net news.

Regards,
Greetings from Mexico,
Eric Garza


Mon, 25 Mar 2002 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. The simplest connection string for MSDASQL and FoxPro's 2.5 dbf?

2. Problem Linking FoxPro 2.5 .dbf's in Access97

3. DBF Compatibility (Foxpro 2.0 To Foxpro 2.5)

4. !!!!!!!!HELP!!!!!!! FoxPro 2.5 .DBF/.CDX Questions

5. How to access / update Foxpro 2.5 dbf by ADO

6. Selecting/Inserting date values from within a string - FoxPro 2.5

7. DAO 2.5 won't convert zero length string to null in date field

8. Password in connection string disappears in MDAC 2.5

9. FoxPro 2.5, 132 columns, and mouse don't mix

10. Foxpro 2.5 & Error Detection Q's

11. FoxPro 2.5 DOS: fichier d'aide, help file

12. report from Foxpro 2.5 won't print in landscape under VFP6.0


 
Powered by phpBB® Forum Software