> You need this one:
>
Dim m_connString As String = "Provider=VFPOLEDB;Data Source=c:\database\main.dbc"
> This one uses the default mode 16, "Share Deny None".
>
>
Dim m_connString As String = "Provider=VFPOLEDB;Data Source=c:\database"
> would also work, provided the tables are in that folder (if you are not using fullpath).
>
> When you get such a message about the dbc you can say that it is in exclusive use somewhere.
>
> Cetin Basoz
Cetin...thank you for your assistance.
I used the following:
Dim m_connString As String = "Provider=VFPOLEDB;Data Source=c:\database\"
This connection string works fine IF I do NOT have the database opened in SHARE mode using VFP 9. When I do have it opened SHARE in VFP9 I get the same "cannot open the c:\database\main.dbc" error message. No difference from what I was getting.
I am the only one using my computer and I only have 1 instance of VFP running and a "Display Status" shows the main.dbc opened. When opening main.dbc I used "Open Database main SHARED".
Thanks again...other ideas? If there were some corruption with the main.dbc or missing tables/etc. from the directory (we use the same directory for the main.dbc and all tables/etc.) would that cause a problem like this? Also, the main.dbc was originally created with vfp 5.0 possibly. We jumped from 5.0 to 9sp2 last June 2008.
Ron