ja klar verwende ich ODBC für den Zugriff....aber um dann auf daten zuzugreifen muss ich doch eine
"SQL" Anweisung schreiben.....(oder gehts auch anders?
)
ich habe das mal hier in dem Code gemacht:
Schnipp-----------------------------------------------------------
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim result2 As New ODBCResultSet
Dim result3 As New ODBCResultSet
Dim Session As New NotesSession
Dim db As NotesDatabase
Dim formular As New NotesDatabase("","Formulare.nsf")
Dim collection As NotesDocumentCollection
Dim doc, formulardoc, searchdoc As NotesDocument
Dim firstName, lastName As String
Dim nam As NotesName
Dim view, ressourceview, projektview As NotesView
Set db = session.CurrentDatabase
Set collection = db.AllDocuments
Set view = db.GetView("Ressourcen2")
Set ressourceview = db.GetView("Ressourcen")
Set projektview = db.GetView("Projekte")
REM erstmal alle Dokumente löschen
Call collection.RemoveAll(True)
If Not con.ConnectTo("Navision") Then
Messagebox "Could not connect to Navision",, _
"Error connecting"
Exit Sub
End If
Set qry.Connection = con
Set result.Query = qry
Set result2.Query = qry
Set result3.Query = qry
REM erstmal alle Projektköpfe löschen
searchform$ = {FORM = "Projektkopf"}
Set collection = db.Search(searchform$, Nothing, 0)
Call collection.RemoveAll(True)
qry.SQL = "SELECT Nr_,Beschreibung,geplantes_Startdatum, geplantes_Endedatum, Status, " &_
"Rech__an_Deb__Nr_ , Name, Projektbuchungsgruppe, Startdatum, erwartetes_Enddatum, ""GeschaftschancePct"" " &_
"FROM Projekt WHERE Projekt.Nr_ LIKE 'PN%' AND (Status = 'Auftrag' OR Status = 'Angebot')"
result.Execute
If result.IsResultSetAvailable Then
Schnapp------------------------------------------------------