i am new to visual basics.plz tell me how to read data from databasr and write to text file recordwise .if any book which will gide me though this .
thanx reply soon
suneel

Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
 
Private Sub Command1_Click()
con.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Data Source=debasis;Persist Security Info=True"
rs.Open Text1.Text, con, adOpenForwardOnly, adLockOptimistic
Dim str As String
If Dir("c:\data.txt") <> "" Then
Kill "c:\data.txt"
End If
Open "c:\DATA.TXT" For Append As #1
Do While rs.EOF = False
For i = 0 To rs.Fields.Count - 1
If i < rs.Fields.Count - 1 Then
str = str & IIf(IsNull(rs(i)), "null", rs(i)) & Chr(9)
Else
str = str & IIf(IsNull(rs(i)), "null", rs(i))
End If
Next
Print #1, str
rs.MoveNext
str = ""
Loop
Close #1
rs.Close
con.Close
End Sub

brother
may i have name of any book for visual basics so that i get my concepts clear.
with regards
suneel kar

There are plenty of availabe in the market. you can gop for any one which suits yoyr requirments. I would suggest to go for the black book or any copy from a good publication house like WROX or TMH.

I don't know if this book is on your market bcoz it says here Only in the Philippines but try to look for it, it's Diethel and Diethel. This book is very friendly.

Hi Suneel,

few of my Favorites:
"Mastering VisualBasic 6.0" by Evangelos Petroutsos
Teach yourself VB6 Series Sam's Publications

REgards
Veena


hi veena
thanx alot for naming books
may i have ur mail id or chat id so that i can contact u whenever i need ur help or suggestions.
regards
suneel kar

have u received my project dear.helllllllllloooooooooooooooo
reply plzzzzzzz
regards
suneel kar

hi
u received my project ornot .say otherwise i wil resend.
regards
suneel

Hello there!! I'm new in the comm. just liked to ask isn't the MSDN library in the software in itself of any help??? Cause some one told me it is...so just asking??

hello bro.
can u send code in ur way of style.as it is easy to understand
dbf location --c drive.
we have to read the records from .dbf file and store data in txt file recordwise.
no of txt files generated shold be equal to no of records.

regards
suneel kar

will u plz reply whether u gonna help me
am waitin
do reply
regards
suneel

This article has been dead for over six months. Start a new discussion instead.