Hello Team Fox,
I am, doing the following:
conFox.Open "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=\\Plexusauto\c\PBSMWIN\LISTS\;Exclusive=No;O
LE DB Services =
0;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
rsFox.Open "SELECT COUNT(*) FROM Binford.dbf WHERE PCN = " & vPCN,
conFox, adOpenForwardOnly, adLockReadOnly
'This works and I can use the following value
vRecCount = rsFox.Fields(0).Value
rsFox.Close
'Tride the following:
'conFox.close()
'conFox.Open
'Tried the following
'Set cmdFox = New ADODB.Command
'cmdFox.ActiveConnection = conFox
'cmdFox.CommandType = adCmdText
'cmdFox.CommandText = "use \\Plexusauto\c\PBSMWIN\LISTS\binford.dbf"
'This _does not work_ 'Syntax error or access violation. However, if I put
the same command in the FoxPro Command 'window, it works and I can APPEN
BLANK, etc. from there.
conFox.Execute "use \\Plexusauto\c\PBSMWIN\LISTS\binford.dbf", ,
adExecuteNoRecords
What am I doing wrong?
--
Tom Schulte
Application Developer
Plexus Systems
248-922-9690
I am, doing the following:
conFox.Open "Driver={Microsoft Visual FoxPro
Driver};SourceType=DBF;SourceDB=\\Plexusauto\c\PBSMWIN\LISTS\;Exclusive=No;O
LE DB Services =
0;BackgroundFetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes;"
rsFox.Open "SELECT COUNT(*) FROM Binford.dbf WHERE PCN = " & vPCN,
conFox, adOpenForwardOnly, adLockReadOnly
'This works and I can use the following value
vRecCount = rsFox.Fields(0).Value
rsFox.Close
'Tride the following:
'conFox.close()
'conFox.Open
'Tried the following
'Set cmdFox = New ADODB.Command
'cmdFox.ActiveConnection = conFox
'cmdFox.CommandType = adCmdText
'cmdFox.CommandText = "use \\Plexusauto\c\PBSMWIN\LISTS\binford.dbf"
'This _does not work_ 'Syntax error or access violation. However, if I put
the same command in the FoxPro Command 'window, it works and I can APPEN
BLANK, etc. from there.
conFox.Execute "use \\Plexusauto\c\PBSMWIN\LISTS\binford.dbf", ,
adExecuteNoRecords
What am I doing wrong?
--
Tom Schulte
Application Developer
Plexus Systems
248-922-9690