Link to home
Start Free TrialLog in
Avatar of Raybone
Raybone

asked on

Accessing Notes Databases via VB

I'm having trouble accessing a Notes Database that's on my server, via Visual Basic. I'm sure it's a simple syntax thing, since I have no such problem when the database is in the default directory (Notes/Data) on the Local server. Here's the code:

Dim session As Object, db As Object, view As Object

Set session = CreateObject("Notes.NotesSession")
Set db = session.GETDATABASE("", "Benefit.nsf")
Set view = db.GetView("EmpSS")

This works great since it's the Local server. When I try to go to my server, I get an error trying to set the view, saying the database isn't open. Please let me know what the syntax should be for:

Server = "HUDSON/HudsonGeneral"
Database = "Notes/Data/Apps/Benefit.nsf"

I've tried many variations of the server name & database path, but with no luck.

Thanx
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Raybone
Raybone

ASKER

Thanks,

I had tried:

Server = "HUDSON/HudsonGeneral"
Database = "apps\Benefits.nsf"

That extra \ did the trick!!!