Это часть кода так как все публиковать нехватит страниц для перелистывания
идея проста ОДБС соединение и вперед. Примечание работает только с текстом, датой, числом.
RTF неработает!!!!!
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uiview As NotesUIView
Dim view As NotesView
Dim view_count As NotesView
Dim doc As NotesDocument
Dim doc_count As NotesDocument
Dim item As NotesItem
Dim item1 As NotesItem
Dim ddd As NotesDateTime
Dim con As ODBCConnection
Dim mas(1010) As String
Dim c_mas As Integer
Dim msg As String
Dim getstr As String
Dim count As Long
Dim num_pod As String
Dim index_pod As String
Dim index_num As String
Dim countcard As Long
Dim countcard1 As String
Dim flag As Integer
Dim pole As String
Dim dateTime As NotesDateTime
Dim dateTime_pod As NotesDateTime
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim qry1 As New ODBCQuery
Dim result1 As New ODBCResultSet
Set db = session.currentdatabase
Set view_count = db.GetView("PODSCHET")
Set doc_count = view_count.GetFirstDocument
Set item = doc_count.GetFirstItem("count")
countcard = item.Values(0)
index_num = "000000"
'Set uiview = workspace.CurrentView
Set view = db.GetView("itogi50")
Set con = New ODBCConnection
If Not con.ConnectTo("Gran1") Then
Messagebox "Could not connect to " & "Gran1"
Else
Messagebox "УРА!!! Произошло, как ни странно, соединение с источником данных - " & "Gran1"
End If
Print "ЖДИТЕ! ИДЕТ ВЫПОЛНЕНИЕ ЗАПРОСА!"
Set qry.Connection = con
Set result.Query = qry
qry.SQL = "SELECT * FROM GRMAIN"
result.Execute
Set qry1.Connection = con
Set result1.Query = qry1
qry1.SQL = "SELECT * FROM OPERS"
result1.Execute
On Error Resume Next
count = 0
If countcard=0 Then
countcard=1
End If
Set doc = view.GetFirstDocument
While Not (doc Is Nothing)
result.AddRow
'***************************************************88
If doc.HasItem("tempuskod") Then
Set item = doc.GetFirstItem("tempuskod")
End If
countcard1 = Cstr(countcard)
p& = Len(countcard1)
s$ = Mid$(index_num,1,6-p&)
card$=num_pod+s$+countcard1
Call result.SetValue("NCARD", card$)
'**************************************************
s_ID$=doc.UniversalID
mas(count)=s_ID$
countcard=countcard+1
count=count+1
result.UpdateRow
Print "ОБРАБОТАНО "+ Str(count)+ " документов"
If count=1000 Then
Set doc = Nothing
Else
Set doc = view.GetNextDocument(doc)
End If
Wend
Call doc_count.ReplaceItemValue("count",countcard)
Call doc_count.Save(True,True)
'ert:
'Messagebox "Закачено! УСЁЁЁЁЁЁЁЁЁЁЁЁЁ"
' con.CommitTransactions
result.Close(DB_CLOSE)
con.Disconnect
'c_mas=0
'Set doc = db.GetDocumentByUNID(mas(c_mas))
count=count-1
Call view.Refresh
Call workspace.ViewRefresh
End Sub