|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
writing records to txt file
I am sending database records to file. My application "was" working as I expected. I now want to implement an sql code on the database, and then execute the export.
my export works like this, While Not myrecord.EOF recproc = recproc + 1 For i = 0 To CInt(thecounter) Print #filenum, (myrecord.Fields(i)); I think that when I do an sql command the 'i' counter no longer works because the items do not exist in the query. the export works only until it reaches a field in the database that was not in the query. I then get an error. Is there another way for me to call the records to get around this? |
|
#2
|
|||
|
|||
|
Code:
Dim fld As ADODB.Field ' asuming ADO
Do Until myrecord.EOF
For Each fld In myrecord.Fields
Print #filenum, fld.Value;
Next
myrecord.MoveNext
Loop
__________________
Programmer's Corner |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > writing records to txt file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|