|
-
Dec 4th, 2000, 04:18 PM
#1
Thread Starter
New Member
I have rewritten some apps from Paradox
to VB6 but one problem I have is, I have
not yet found a way to show deleted records
on dBase IV tables in VB. Does anyone know
if this is possible?
Thanks for any help in advance.
-
Dec 5th, 2000, 01:25 PM
#2
Hyperactive Member
I don't know about Dbase but in FoxPro (which is Xbase) you can do something like this.
Code:
cnnYourConnect.Execute "Set Deleted Off"
This allows me to see the deleted records.
if you want to set it back.
Code:
cnnYourConnect.execute "Set Deleted On"
-
Dec 6th, 2000, 12:33 PM
#3
Thread Starter
New Member
I receive an error : Expected SQL Statement.
Am I not doing it right?
-
Dec 6th, 2000, 12:49 PM
#4
Hyperactive Member
How are connecting to your database? (code?)
-
Dec 6th, 2000, 04:54 PM
#5
Thread Starter
New Member
Public Sub first()
Set cnConn = New ADODB.Connection
Set cmdConn = New ADODB.Command
Set rsConn = New ADODB.Recordset
cnConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=f:\users\mdoss\pdcdata\data;Extended Properties=dBase IV;Persist Security Info=False"
Set cmdConn.ActiveConnection = cnConn
cmdConn.CommandText = "filectrl.dbf"
cmdConn.Execute "Set Deleted Off"
Set rsConn = cmdConn.Execute(adCmdTable)
rsConn.MoveFirst
While Not rsConn.EOF
x = x + 1
rsConn.MoveNext
Wend
MsgBox Str(x)
End Sub
I changed the execute to run on the command,
I do not receive any error messages, but it
still does not show deleted records.
-
Dec 7th, 2000, 10:05 AM
#6
Hyperactive Member
I don't know how to see the deleted records using the Dbase driver, but if want you could use the Visual FoxPro Driver and build your connect string like so:
Code:
strConnect = "DSN=Visual FoxPro Tables;UID=;"
strConnect = strConnect & "PWD=;SourceDB=f:\users\mdoss\pdcdata\data;"
strConnect = strConnect & "SourceType=DBF;Exclusive=No;"
strConnect = strConnect & "BackgroundFetch=Yes;"
strConnect = strConnect & "Collate=Machine;Null=Yes;Deleted=No;"
cnConn.Open strConnect
Hope this helps.
[Edited by dcarlson on 12-07-2000 at 11:49 AM]
-
Dec 8th, 2000, 11:56 AM
#7
Thread Starter
New Member
Still failing.
Cannot find installable ISAM.
-
Dec 8th, 2000, 12:06 PM
#8
Hyperactive Member
You may need to install the VFP Driver. Check your ODBC datasources for the Microsoft Visual FoxPro Driver. I think you can install it with the Visual Basic or Visual Studio CD.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|