what would keep a ini file open on a file server?
Main question is what would keep a ini file open on a file server?
so other computers can't read from it.
I have a ini file on a Windows 2000 workstation file server
contents listed below
----- begin of ini file
[NextNumbers]
JobNumber=601
BidNumber=20329
[Database]
DatabasePath=K:\Atlas.mdb
------ end of ini file
We have a main computer station that does all the login of all jobs.
But some other stations go to login and they cant, because the ini file is
still open,
if you go to the server an list all open files it shows the ini file from
the main computer
still has it open.
This is the line that gets the path to the database, below
InfoManager.DataBasePath = GetIniString("Database", "DatabasePath",
InfoManager.IniFilePath, "K:\Atlas.mdb")
and this is the function, below
Public Function GetIniString(Section As String, Key As String, IniLocation
As String, Optional default As String) As String
Dim ReturnValue As String * 128
Dim i, sLet
Dim iLen As Long
Dim length As Long
length = GetPrivateProfileString(Section, Key, default, ReturnValue,
128, IniLocation)
i = InStr(1, Trim(ReturnValue), Chr(0))
iLen = Len(Trim(ReturnValue))
GetIniString = CStr(Left(Trim(ReturnValue), (i - 1)))
End Function
get new job number from ini file
NewNumber$ = GetIniString("NextNumbers", "JobNumber",
InfoManager.IniFilePath)
Re: what would keep a ini file open on a file server?
Not sure what would keep it open, but reboot the server and it will be
fixed.
Not to say that it won't happen again...
--
Bradley Dean
Bill A <atlastruss@gbso.net> wrote in message news:3981c584@news.devx.com...
>
> Main question is what would keep a ini file open on a file server?
> so other computers can't read from it.
>
> I have a ini file on a Windows 2000 workstation file server
> contents listed below
>
> ----- begin of ini file
>
> [NextNumbers]
> JobNumber=601
> BidNumber=20329
>
> [Database]
> DatabasePath=K:\Atlas.mdb
> ------ end of ini file
>
> We have a main computer station that does all the login of all jobs.
> But some other stations go to login and they cant, because the ini file is
> still open,
> if you go to the server an list all open files it shows the ini file from
> the main computer
> still has it open.
>
> This is the line that gets the path to the database, below
>
> InfoManager.DataBasePath = GetIniString("Database", "DatabasePath",
> InfoManager.IniFilePath, "K:\Atlas.mdb")
>
>
> and this is the function, below
>
> Public Function GetIniString(Section As String, Key As String, IniLocation
> As String, Optional default As String) As String
> Dim ReturnValue As String * 128
> Dim i, sLet
> Dim iLen As Long
> Dim length As Long
> length = GetPrivateProfileString(Section, Key, default, ReturnValue,
> 128, IniLocation)
> i = InStr(1, Trim(ReturnValue), Chr(0))
> iLen = Len(Trim(ReturnValue))
> GetIniString = CStr(Left(Trim(ReturnValue), (i - 1)))
> End Function
>
>
> get new job number from ini file
>
>
> NewNumber$ = GetIniString("NextNumbers", "JobNumber",
> InfoManager.IniFilePath)
>
>
Re: what would keep a ini file open on a file server?
Locking the file with some API will do the trick.
"Bill A" <atlastruss@gbso.net> wrote in message
news:3981c584@news.devx.com...
>
> Main question is what would keep a ini file open on a file server?
> so other computers can't read from it.
>
> I have a ini file on a Windows 2000 workstation file server
> contents listed below
>
> ----- begin of ini file
>
> [NextNumbers]
> JobNumber=601
> BidNumber=20329
>
> [Database]
> DatabasePath=K:\Atlas.mdb
> ------ end of ini file
>
> We have a main computer station that does all the login of all jobs.
> But some other stations go to login and they cant, because the ini file is
> still open,
> if you go to the server an list all open files it shows the ini file from
> the main computer
> still has it open.
>
> This is the line that gets the path to the database, below
>
> InfoManager.DataBasePath = GetIniString("Database", "DatabasePath",
> InfoManager.IniFilePath, "K:\Atlas.mdb")
>
>
> and this is the function, below
>
> Public Function GetIniString(Section As String, Key As String, IniLocation
> As String, Optional default As String) As String
> Dim ReturnValue As String * 128
> Dim i, sLet
> Dim iLen As Long
> Dim length As Long
> length = GetPrivateProfileString(Section, Key, default, ReturnValue,
> 128, IniLocation)
> i = InStr(1, Trim(ReturnValue), Chr(0))
> iLen = Len(Trim(ReturnValue))
> GetIniString = CStr(Left(Trim(ReturnValue), (i - 1)))
> End Function
>
>
> get new job number from ini file
>
>
> NewNumber$ = GetIniString("NextNumbers", "JobNumber",
> InfoManager.IniFilePath)
>
>
Re: what would keep a ini file open on a file server?
Everybody is missing the point.
I am using a windows routine and it is not releasing the ini file.
Yesterday we even applied the service pack-1 for windows 2000
to our file server and that did not fix it.
Thanks Bill A
Bill A <atlastruss@gbso.net> wrote in message news:3981c584@news.devx.com...
>
> Main question is what would keep a ini file open on a file server?
> so other computers can't read from it.
>
> I have a ini file on a Windows 2000 workstation file server
> contents listed below
>
> ----- begin of ini file
>
> [NextNumbers]
> JobNumber=601
> BidNumber=20329
>
> [Database]
> DatabasePath=K:\Atlas.mdb
> ------ end of ini file
>
> We have a main computer station that does all the login of all jobs.
> But some other stations go to login and they cant, because the ini file is
> still open,
> if you go to the server an list all open files it shows the ini file from
> the main computer
> still has it open.
>
> This is the line that gets the path to the database, below
>
> InfoManager.DataBasePath = GetIniString("Database", "DatabasePath",
> InfoManager.IniFilePath, "K:\Atlas.mdb")
>
>
> and this is the function, below
>
> Public Function GetIniString(Section As String, Key As String, IniLocation
> As String, Optional default As String) As String
> Dim ReturnValue As String * 128
> Dim i, sLet
> Dim iLen As Long
> Dim length As Long
> length = GetPrivateProfileString(Section, Key, default, ReturnValue,
> 128, IniLocation)
> i = InStr(1, Trim(ReturnValue), Chr(0))
> iLen = Len(Trim(ReturnValue))
> GetIniString = CStr(Left(Trim(ReturnValue), (i - 1)))
> End Function
>
>
> get new job number from ini file
>
>
> NewNumber$ = GetIniString("NextNumbers", "JobNumber",
> InfoManager.IniFilePath)
>
>