Changing MaxLocksPerFile Registy Setting in C#.NET
-
I've looked at some sample code and used the MSDN Library but its not really helping me. I'd like to be able to have code change the MaxLocksPerFile setting in the registry located Under HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Jet/4.0/Engines/Jet 4.0. I can manually change this value but i would like to change it in the code. This needs to be increased because Microsoft Access has problems handling large amounts of data. I have an access database that has hundreds of thousands of records in it and when a user wants to update data in the database there is an error stating "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry." Increasing the value significantly does fix the problem but it would be nice to change this value automatically with code when the user wants to update the database instead of having to go change the registry manually. Any help would be greatly appreciated.
-
I've looked at some sample code and used the MSDN Library but its not really helping me. I'd like to be able to have code change the MaxLocksPerFile setting in the registry located Under HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Jet/4.0/Engines/Jet 4.0. I can manually change this value but i would like to change it in the code. This needs to be increased because Microsoft Access has problems handling large amounts of data. I have an access database that has hundreds of thousands of records in it and when a user wants to update data in the database there is an error stating "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry." Increasing the value significantly does fix the problem but it would be nice to change this value automatically with code when the user wants to update the database instead of having to go change the registry manually. Any help would be greatly appreciated.
-
I've looked at some sample code and used the MSDN Library but its not really helping me. I'd like to be able to have code change the MaxLocksPerFile setting in the registry located Under HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Jet/4.0/Engines/Jet 4.0. I can manually change this value but i would like to change it in the code. This needs to be increased because Microsoft Access has problems handling large amounts of data. I have an access database that has hundreds of thousands of records in it and when a user wants to update data in the database there is an error stating "File sharing lock count exceeded. Increase MaxLocksPerFile registry entry." Increasing the value significantly does fix the problem but it would be nice to change this value automatically with code when the user wants to update the database instead of having to go change the registry manually. Any help would be greatly appreciated.
I have same problem. Can you help me? acdb.ExecuteSQL($@"ALTER TABLE {tableName} ADD COLUMN ROW_NUMBER AUTOINCREMENT");