
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
03.11.2004, 12:18:59
|
|||
|---|---|---|---|
|
|||
Убрать кавычки при выгрузке в текстовый файл |
|||
|
#18+
Привет всем. Выгружаю записи в текстовый, но при этом каждая строка обрамляется кавычками. Как сделать чтобы не происходило обрамление кавычками? Private Sub btnOK_Click() Dim strProjectPath As String, strDirFilePath As String, strFileName As String Dim cFile As Long Dim cmd As ADODB.Command Dim prm As ADODB.Parameter Dim NodeRS As ADODB.Recordset Dim SQLstr, NodeText As String Dim NodeX As Node Dim Name As String, EmployeeName As String On Error GoTo Err_ShowTreeHandler '------------------- Set NodeRS = New ADODB.Recordset Set cmd = New ADODB.Command Set cmd.ActiveConnection = CurrentProject.Connection cmd.CommandText = "uspOrgStructDown" cmd.CommandType = adCmdStoredProc cmd.Parameters.Refresh cmd.Parameters("@startPoint") = Null Set NodeRS = cmd.Execute strProjectPath = CurrentProject.Path & "\" 'Текущий путь к проекту strDirFilePath = strProjectPath strFileName = "orgstruct.txt" ChDir strProjectPath hFile = FreeFile On Error GoTo Err_OpenFile Open strFileName For Output Access Write As hFile Write #hFile, "UniqueID" & Chr(9) & "Name" & Chr(9) & "EmployeeName" & Chr(9) & "Reports_To" i = 0 Do While Not NodeRS.EOF UniqueID = Trim(NodeRS!Item) If IsNull(NodeRS!Parent) Then Reports_To = Null Else Reports_To = NodeRS!Parent End If Name = NodeRS!ItemName EmployeeName = Nz(NodeRS!empName) Write #hFile, UniqueID & Chr(9) & Name & Chr(9) & EmployeeName & Chr(9) & Reports_To NodeRS.MoveNext Loop Set NodeRS = Nothing Set cmd = Nothing Close hFile MsgBox "Организационная структура успешно выгружена в файл.", vbInformation '----------------- Exit Sub Err_ShowTreeHandler: Set NodeRS = Nothing Set cmd = Nothing MsgBox "Ошибка выгрузки.", vbCritical '----------------- Exit Sub Err_OpenFile: Set NodeRS = Nothing Set cmd = Nothing MsgBox "Ошибка открытия файла для записи.", vbCritical End Sub ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
03.11.2004, 12:28:15
|
|||
|---|---|---|---|
Убрать кавычки при выгрузке в текстовый файл |
|||
|
#18+
Print -попробуй Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. автор Linetype RecordKey ItemCode ItemName ItemsGroupCode U_ParNum U_Seria U_Group Item Number Description Item Grouping Userfield1 Userfield2 Userfield2 H 1 A00001 Websense Premium Group I 100 users 2-Year subscription 103 10-100-WEBSENSE-SL Websense Premium Windows H 2 A00002 Websense Premium Group I 250 users 2-Year subscription 103 10-101-WEBSENSE-SL Websense Premium Windows H 3 A00003 Websense Premium Group I 500 users 2-Year subscription 103 10-102-WEBSENSE-SL Websense Premium Windows H 4 A00004 Websense Premium Group I 750 users 2-Year subscription 103 10-103-WEBSENSE-SL Websense Premium Windows H 5 A00005 Websense Premium Group I 1000 users 2-Year subscription 103 10-104-WEBSENSE-SL Websense Premium Windows ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=45&tablet=1&tid=1670591]: |
0ms |
get settings: |
6ms |
get forum list: |
12ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
33ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
39ms |
get tp. blocked users: |
1ms |
| others: | 202ms |
| total: | 310ms |

| 0 / 0 |
