Hi there,
does anbody know it it’s possilbe to access the current database by SQL, maybe using something like this:
Dim con As New ODBCConnection
con.ConnectTo(db.server & “/” & db.filename) …
I would like to run a SQL query like:
SELECT DISTINCT field_name FROM formname;
getting all unique values of the field “field_name” from documents with the form “formname” in Lotus Script.
Is something like this possible?
Thanks
Ralph
Subject: RE: Is it possible to access current Notes Database by SQL Query?
There’s something called NotesSQL, but I don’t think you would like the performance for a query like that - besides which you would need to install it in the workstations if you run this code from a workstation.
Instead, use the regular Notes classes and design elements instead: create a view that’s categorized by your key field, and read the values off the categorized column (which you can do using @DbColumn, or if in LotusScript, by @DbColumn using Evaluate, or by creating a NotesViewNavigator and iterating thru the category entries.