We have an Access mdb database originally built in the late 90s. We currently use MS Access 2000 on Win7. Since switching to win7 from XP the database keeps getting locked and corrupted and we are unable to open it. We then have to revert to backup copies made days before and lose lots of data. The database is around 36mb. So does anyone know; A) Is there any way to repair these locked/corrupted mdb files so we don’t lose data every time this happens. And B) why this issue may be occurring in the first place. Are there known …

Member Avatar
Member Avatar
+0 forum 4

Good morning, I have 2 client applications which do the same thing. The first app which is written in VBA(MS ACCESS) and the other is ASP.Net. We can have multiple items for a client so we use a transaction id. When the access application starts a new transaction the app gets a new transaction id and increments by 1 as follows. If VH_TRANSACTION = 0 Then ' New voucher get next transaction number With rst1 .Open "SELECT CONF_TRANSACTION FROM tblConfiguration WHERE CONF_CO_ID = " & gblUserInfo.AgencyCountry, CurrentProject.Connection, adOpenDynamic, adLockOptimistic !CONF_TRANSACTION = Nz(!CONF_TRANSACTION) + 1 gblTRANSACTION = !CONF_TRANSACTION .Update .Close End …

Member Avatar
Member Avatar
+0 forum 1

I have 3 table which are ![zz.PNG](/attachments/large/3/f81c645612d06529dba9af30a4a314ac.PNG "align-center") I want to duplicate a record from the master table in the same time it will duplicate all children table. I will assign new primary key to the new duplicate record. For the tbl_System and tbl_MainComp work fine. But when i have 2 record in tbl_MainComp and each of them contain 1 record in tbl_SubComp, it just copy all the record in tbl_SubComp to each tbl_MainComp record. cmd.CommandText = "INSERT INTO tbl_System (EquipTag, S_Name, S_Function, S_Failure) " & " SELECT '" & TextBox1.Text & "', S_Name, S_Function, S_Failure FROM tbl_System WHERE EquipTag …

Member Avatar
+0 forum 0

When I add a NEW row to the datagridview, it for some reason freezes the datagridview. That is, it adds the rows pulled from the database to the grid. But you can't add rows to the datagrid by some a click button event. Nor can you select a row in the datagrid view. Below is the query and the code used to add the rows. [CODE] Dim JudgesQuery As New OleDb.OleDbCommand("SELECT * FROM JudgeList WHERE TournamentID = ?", Oleconnection) JudgesQuery.Parameters.AddWithValue("?", Me.TournID) Dim JudgesDataAdapter As New OleDb.OleDbDataAdapter Dim JudgesDataTable As New DataTable JudgesDataAdapter.SelectCommand = JudgesQuery Dim JudgesDataSet As New DataSet JudgesDataAdapter.Fill(JudgesDataSet, …

Member Avatar
+0 forum 0

I have a storedProcedure in SQL-Server that I am using to delete duplicates from one of the tables. This storedprocedure makes use of a cursor. I tried to create the same storedprocedure in microsoft access by just replacing the 'CREATE PROCEDURE' with 'CREATE PROC' but it didn't seem to work. Can anyone provide some workaround? Here is the SQL- storedprocedure:- [CODE] ALTER PROCEDURE [dbo].[csp_loginfo_duplicates] AS BEGIN SET NOCOUNT ON; declare @minrowid bigint declare @empid nvarchar(15) declare @dtpunched datetime declare @count tinyint declare curDuplicate cursor for select empid,dtpunched,count(*),min(row_id) from loginfo group by empid,dtpunched having count(*)>1 open curDuplicate fetch next from curduplicate …

Member Avatar
Member Avatar
+0 forum 1

Hi Looking for some general advice: I have taken over support of a large and complex web site, which uses multiple Access databases. At present it makes use of the MS Jet database engine (Provider=Microsoft.Jet.OLEDB.4.0). (as well as MySQL, used in a Snitz forum). After solving many specific problems I am left with a nasty situation, where certain database calls appear to cause the Jet engine to freeze, and everything halts until pages time out and the blockage is cleared. After such a timeout everything runs nicely until the next incident. These incidents are random. There is some evidence that …

Member Avatar
Member Avatar
+0 forum 3

Hi guys, I'm finding myself in a little trouble. I've tried to google this problem, but without much success. Hopefully its something simple I'm missing and someone will be able to help me. I'm writing a little program that will synchronize two access database schema's. It works, to a point. My problem is, I'm unable to identify whats an AutoNumber and whats a Long Integer. Both DATA_TYPES are 3, same with COLUMN_FLAGS, both are 90. a Long Integer that doesn't allow nulls COLUMN_FLAGS will be 90 and its DATA_TYPE will be 3 an AutoNumber will also be COLUMN_FLAGS = 90 …

Member Avatar
Member Avatar
+0 forum 3

static void Main(string[] args) { string[,] fp = readFilePaths(); OleDbConnection con = new OleDbConnection(); OleDbDataAdapter da; DataSet ds = new DataSet(); con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:/Documents and Settings/kyalanur/Desktop/Nav tool/PCGDataManager.mdb;User ID=;Password=;"; string sq = "SELECT * FROM History"; con.Open(); da = new OleDbDataAdapter(sq, con); da.Fill(ds, "History"); for (int i = 0; i < 284; i++) { if(true) { //Enter into the dtabase DataRow dr = ds.Tables["History"].NewRow(); dr[0] = DateTime.Today.Date.ToString(); dr[0] = fp[i,2]; dr[2] = generateFilePath(fp[i, 0], fp[i, 1]); dr[3] = " "; dr[4] = " "; dr[5] = fp[i, 3]; ds.Tables["History"].Rows.Add(dr); //OleDbCommandBuilder cb = new OleDbCommandBuilder(da); //da.UpdateCommand = cb.GetUpdateCommand(); da.Update(ds, "History"); } …

Member Avatar
Member Avatar
+0 forum 4

The End.