|
|
|
Проблема с певодом данных в текстовый файл
|
|||
|---|---|---|---|
|
#18+
помогите, плииизз! кто чем может! код не загружает все значения из полей. есть 2 таблицы, всего полей больше 255, нужно собрать все кроме первых 3х из 2й таблицы, вот как я пытаюсь сделать a = "SELECT * FROM FOREIGNPart1updt;" b = "SELECT FOREIGNPart2.* FROM FOREIGNPart1updt INNER JOIN FOREIGNPart2 ON FOREIGNPart1updt.[MEMBERS ACCOUNT] = FOREIGNPart2.[MEMBER'S ACCOUNT NUMBER];" Set rs1 = db.OpenRecordset("FOREIGNPart1updt", dbOpenSnapshot) Set rs2 = db.OpenRecordset("FOREIGNPart2", dbOpenSnapshot) Set rs4 = db.OpenRecordset(a) Set rs5 = db.OpenRecordset(b) Open "C:\data\92322FOREIGN.txt" For Output As #1 ' destination file For i = 1 To 2 For intCount = 0 To rs1.Fields.Count - 1 Print #1, """" & rs1(intCount).Name & """" & Chr(9); Next For intCount = 3 To rs2.Fields.Count - 1 If intCount < rs2.Fields.Count - 1 Then Print #1, """" & rs2(intCount).Name & """" & Chr(9); Else Print #1, """" & rs2(intCount).Name & """"; End If Next 'Write new line Print #1, Next 'write the data from each recordset Do While Not rs4.EOF And Not rs5.EOF For intCount4 = 0 To rs4.Fields.Count - 1 If intCount4 = 52 Or intCount4 = 56 Or intCount4 = 60 Or intCount4 = 64 Then Print #1, """" & FormatCurrency(rs4(intCount4).Value) & """" & Chr(9); Else Print #1, """" & rs4(intCount4).Value & """" & Chr(9); End If Next rs4.MoveNext For intCount5 = 3 To rs5.Fields.Count - 1 If intCount5 < rs5.Fields.Count - 1 Then If intCount5 = 15 Then Print #1, """" & FormatCurrency(rs5(intCount5).Value / 1000) & """" & Chr(9); Else Print #1, """" & rs5(intCount5).Value & """" & Chr(9); End If Else Print #1, """" & rs5(intCount5).Value & """" & Chr(10); End If Next rs5.MoveNext Loop Print #1, Close #1 на середине строки 2й таблицы (value) пропускает NULL т.е. с 19 поля 2й таблицы все смещает на одно поле. заранее спасибо ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.09.2004, 03:19:17 |
|
||
|
|

start [/forum/topic.php?fid=45&msg=32694799&tid=1671776]: |
0ms |
get settings: |
8ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
38ms |
get topic data: |
9ms |
get forum data: |
3ms |
get page messages: |
22ms |
get tp. blocked users: |
2ms |
| others: | 237ms |
| total: | 339ms |

| 0 / 0 |
