| | |
Read Me:Access to any type of DB's possible
![]() |
•
•
Join Date: Jul 2007
Posts: 71
Reputation:
Solved Threads: 1
hi Mohanram
this is me suneel.i am sendin u code for readin data from .dbf files recordwise and storing the data recordwise in txt file.but it is givin me the errr"Could not find installable ISAM' wts that.someone has edited my code but its not workin then also.it is edited code.
Option Explicit
Dim DB As Database
Private Sub Command1_Click()
'
Dim sSQL As String
Dim RST As Recordset
Dim FN As Long
Dim j As Integer
Dim FldCnt As Integer
Dim i As Long
'
Set DB = DBEngine.OpenDatabase(App.Path, False, False, "FoxPro 2.5;")
sSQL = "Select * from RR Order By SNo"
Set RST = DB.OpenRecordset(sSQL, dbOpenSnapshot)
If RST.RecordCount > 0 Then
RST.MoveFirst
If Dir("c:\RecTexts") = "" Then
MkDir "c:\RecTexts"
End If
If Dir("c:\RecTexts\data.txt") <> "" Then
Kill "c:\RecTexts\*.*"
End If
'
i = 0
'
FldCnt = RST.Fields.Count - 1
Do While Not RST.EOF
'
i = i + 1
FN = FreeFile
Open "c:\RecTexts\DATA" & i & ".TXT" For Append As FN
For j = 0 To FldCnt
Print #FN, IIf(IsNull(RST(j)), "", RST(j))
Next
Close #FN
RST.MoveNext
Loop
End If
RST.Close
Set RST = Nothing
DB.Close
Set DB = Nothing
MsgBox "Transfer Over Check Folder C:\RecTexts"
End Sub
reply soon
regards
suneel
this is me suneel.i am sendin u code for readin data from .dbf files recordwise and storing the data recordwise in txt file.but it is givin me the errr"Could not find installable ISAM' wts that.someone has edited my code but its not workin then also.it is edited code.
Option Explicit
Dim DB As Database
Private Sub Command1_Click()
'
Dim sSQL As String
Dim RST As Recordset
Dim FN As Long
Dim j As Integer
Dim FldCnt As Integer
Dim i As Long
'
Set DB = DBEngine.OpenDatabase(App.Path, False, False, "FoxPro 2.5;")
sSQL = "Select * from RR Order By SNo"
Set RST = DB.OpenRecordset(sSQL, dbOpenSnapshot)
If RST.RecordCount > 0 Then
RST.MoveFirst
If Dir("c:\RecTexts") = "" Then
MkDir "c:\RecTexts"
End If
If Dir("c:\RecTexts\data.txt") <> "" Then
Kill "c:\RecTexts\*.*"
End If
'
i = 0
'
FldCnt = RST.Fields.Count - 1
Do While Not RST.EOF
'
i = i + 1
FN = FreeFile
Open "c:\RecTexts\DATA" & i & ".TXT" For Append As FN
For j = 0 To FldCnt
Print #FN, IIf(IsNull(RST(j)), "", RST(j))
Next
Close #FN
RST.MoveNext
Loop
End If
RST.Close
Set RST = Nothing
DB.Close
Set DB = Nothing
MsgBox "Transfer Over Check Folder C:\RecTexts"
End Sub
reply soon
regards
suneel
•
•
Join Date: Jun 2007
Posts: 166
Reputation:
Solved Threads: 9
•
•
•
•
hi Mohanram
this is me suneel.i am sendin u code for readin data from .dbf files recordwise and storing the data recordwise in txt file.but it is givin me the errr"Could not find installable ISAM' wts that.someone has edited my code but its not workin then also.it is edited code.
Option Explicit
Dim DB As Database
Private Sub Command1_Click()
'
Dim sSQL As String
Dim RST As Recordset
Dim FN As Long
Dim j As Integer
Dim FldCnt As Integer
Dim i As Long
'
Set DB = DBEngine.OpenDatabase(App.Path, False, False, "FoxPro 2.5;")
sSQL = "Select * from RR Order By SNo"
Set RST = DB.OpenRecordset(sSQL, dbOpenSnapshot)
If RST.RecordCount > 0 Then
RST.MoveFirst
If Dir("c:\RecTexts") = "" Then
MkDir "c:\RecTexts"
End If
If Dir("c:\RecTexts\data.txt") <> "" Then
Kill "c:\RecTexts\*.*"
End If
'
i = 0
'
FldCnt = RST.Fields.Count - 1
Do While Not RST.EOF
'
i = i + 1
FN = FreeFile
Open "c:\RecTexts\DATA" & i & ".TXT" For Append As FN
For j = 0 To FldCnt
Print #FN, IIf(IsNull(RST(j)), "", RST(j))
Next
Close #FN
RST.MoveNext
Loop
End If
RST.Close
Set RST = Nothing
DB.Close
Set DB = Nothing
MsgBox "Transfer Over Check Folder C:\RecTexts"
End Sub
reply soon
regards
suneel
Get me the full path and dbf file name from which you want to grab records.
regards
manoharan
•
•
Join Date: Jul 2007
Posts: 71
Reputation:
Solved Threads: 1
.dbf file name is RR.dbf,
path where project is saved is C:\suneel-development\New folder\record reading.
these things veena told me to do but i am not v clear with this the code which u send me earlier was easy to understand .mazy i have ue gmail id
if u can help me i will be thankful
reply soon
regards
suneel.
path where project is saved is C:\suneel-development\New folder\record reading.
these things veena told me to do but i am not v clear with this the code which u send me earlier was easy to understand .mazy i have ue gmail id
if u can help me i will be thankful
reply soon
regards
suneel.
•
•
Join Date: Jun 2007
Posts: 166
Reputation:
Solved Threads: 9
•
•
•
•
.dbf file name is RR.dbf,
path where project is saved is C:\suneel-development\New folder\record reading.
these things veena told me to do but i am not v clear with this the code which u send me earlier was easy to understand .mazy i have ue gmail id
if u can help me i will be thankful
reply soon
regards
suneel.
![]() |
Similar Threads
- accessing ms access from VB (Visual Basic 4 / 5 / 6)
- opening files with read and write access (PHP)
- 1000% Speed Increase Using Linux Kernel 2.6 (Kernels and Modules)
- Trojan.Bookmarker.gen/about:blank (Viruses, Spyware and other Nasties)
- Problem W/install / Setup Of Win Xp (Windows NT / 2000 / XP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: help with usernames and passwords and arrays
- Next Thread: video in visual basic
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






