I'm unable to add a user via the TIBCSecurityService. Wondering if anyone has encountered this before? It is working on some machines, but not on others. For instance, it will work on one Vista machine, but not the other. Also, not working on Windows 7 machine, but we only have one of them here for testing.
When calling TIBCSecurityService.Attach, I get an error 'Cannot attach to services manager'.
Any help would be greatly appreciated.
TIBCSecurityService: Cannot attach to services manager
-
- Posts: 12
- Joined: Thu 04 Dec 2008 23:08
-
- Posts: 12
- Joined: Thu 04 Dec 2008 23:08
-
- Posts: 12
- Joined: Thu 04 Dec 2008 23:08
I seem to have gotten past the user creation. At this point, it is working, it just takes a very long time. But, I am now getting an error when I call IBCConnection.CreateDatabase.
"operating system directive CreateFile failed
The requested operation cannot be performed on a file with a user-mapped section open."
The code is a follows:
[/code]
"operating system directive CreateFile failed
The requested operation cannot be performed on a file with a user-mapped section open."
The code is a follows:
Code: Select all
MyDatabase.Database := ExtractFilePath(Application.ExeName)+DATA_PATH+DATA_FILE_NAME;
MyDatabase.Params.Clear;
MyDatabase.Params.Add('SERVER ''MINIPC1''');
MyDatabase.Params.Add('USER ''MYUSERNAME''');
MyDatabase.Params.Add('PASSWORD ''mypassword''');
MyDatabase.Params.Add('PAGE_SIZE 4096');
MyDatabase.CreateDatabase;
TIBCSecurityService manages users for the whole InterBase server (not for a single database). Therefore independently on database location (local or remote) application must connect to InterBase server by TCP protocol to the 3050 port. If you try to connect to InterBase server by TCP protocol you can get error "Cannot attach to services manager" in two cases:
- FireWall on the computer doesn't allow to connect to the 3050 port.
- Only InterBase 2007 SP1 is certified for Windows Vista. InterBase 6 and InterBase 7 sometimes can be installed incorrectly on Windows Vista and Windows 7. If installation was incorrect then InterBase 6 and InterBase 7 don't listen to the 3050 port and you cannot connect to server by TCP protocol to the 3050 port. In this case database can work correctly if you try to connect locally. But you cannot manage users because you cannot connect to port 3050.
Error "Operating system directive CreateFile failed. The requested operation cannot be performed on a file with a user-mapped section open." can arise if you try to edit or recreate a file that is blocked by another application. In your situation this error can arise if your try to create database with a file name that already exists and is used by some application (including recreating an existing database).
- FireWall on the computer doesn't allow to connect to the 3050 port.
- Only InterBase 2007 SP1 is certified for Windows Vista. InterBase 6 and InterBase 7 sometimes can be installed incorrectly on Windows Vista and Windows 7. If installation was incorrect then InterBase 6 and InterBase 7 don't listen to the 3050 port and you cannot connect to server by TCP protocol to the 3050 port. In this case database can work correctly if you try to connect locally. But you cannot manage users because you cannot connect to port 3050.
Error "Operating system directive CreateFile failed. The requested operation cannot be performed on a file with a user-mapped section open." can arise if you try to edit or recreate a file that is blocked by another application. In your situation this error can arise if your try to create database with a file name that already exists and is used by some application (including recreating an existing database).