Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Database/ADO    [ Add a report in this area ]  
Report #:  93656   Status: Closed
TADOConnection.ConnectionString value loss on Mocrosoft Foxpro ODBC Provider(Windows 7 only)
Project:  Delphi Build #:  14.0.3615.26342
Version:    14.2 Submitted By:   Vladimir Ilyich Vysockiy
Report Type:  Crash / Data loss / Total failure Date Reported:  5/6/2011 12:15:05 PM
Severity:    Infrequently encountered problem Last Updated: 5/8/2011 6:18:31 PM
Platform:    All versions Internal Tracking #:  
Resolution: Duplicate (Resolution Comments) Resolved in Build: : None
Duplicate of:  88925
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
None
Steps to Reproduce:
Error occurs only on Windows 7 (32 and 64 bit) and Microsoft Foxpro ODBC drivers


  ADOConnection1.ConnectionString:='Provider=MSDASQL.1;Persist Security Info=False;Mode=Read;Extended Properties="DSN=Visual FoxPro Tables;UID=;SourceDB=C:\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"';
  ADOConnection1.Connected:=true;

  //ADOConnection1.ConnectionString='Provider=MSDASQL.1;Persist Security Info=False;Mode=Read;' ????????!!!!!

  ADOConnection1.Connected:=false;

  ADOConnection1.Connected:=true; // <<--Error message
Workarounds
Create a BeforeConnect and install the correct value ADOConnection1.ConnectionString

  if not ADOConnection1.Connected then
    ADOConnection1.ConnectionString:='Provider=MSDASQL.1;Persist Security Info=False;Mode=Read;Extended Properties="DSN=Visual FoxPro Tables;UID=;SourceDB=C:\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"';


Not pretty but it works :)
Attachment
AdoErrorConnectionString.zip
Comments

Tomohiro Takahashi at 5/7/2011 7:17:03 PM -
Is your issye similar to QC#88925 ?

> Error occurs only on ... Microsoft Foxpro ODBC drivers
How about other ODBC drivers(e.g., MySQL etc...)?

Vladimir Ilyich Vysockiy at 5/8/2011 10:53:29 AM -
Yes similar.
"Persist Security Info=True" solves the problem. Thanks.

The same code works fine on Xp and not working on Windows 7.
Microsoft Foxpro ODBC driver used a single distribution. Strange.

>> Error occurs only on ... Microsoft Foxpro ODBC drivers

>How about other ODBC drivers(e.g., MySQL etc...)?


Checked SqLite3 and MySql, a similar error.

Checked MS SQL Server Native Client  (Persist Security Info=false), on Xp and Windows 7 is Ok.


Tomohiro Takahashi at 5/8/2011 6:19:23 PM -
I think this issue is due to ADO layer which comes with OSs.

Server Response from: ETNACODE01