ms-access

Convert Access 2010 to older versions

本秂侑毒 提交于 2020-01-14 14:11:09
问题 I want to be able to convert a Access 2010 database to multiple different older version by using a script So if I feed a 2010 Access to the script I want it to spit out one of the following versions: 2000, 2002, 2003 or 2007. How is this possible? I'm not looking for a complete script, but more a pointer in the right direction or perhaps an example of how it can be done. * EDIT * TmpName = Destination & "\" & dbDisname & "_2002.mdb" If Dir(TmpName) <> "" Then FS.deletefile TmpName End If

Connection Pooling with Access database

耗尽温柔 提交于 2020-01-14 09:07:07
问题 I have an application which reads data from an Access databse frequently, is there any way to use connection pooling? My Open Databse method:- private bool OpenDatabaseConnection(string databaseName) { try { string connectionString = "Provider = Microsoft.Jet.OLEDB.4.0; " + "Data Source = " + databaseName + ";"; settingsDbConn = new OleDbConnection(connectionString); settingsDbConn.Open(); } catch (Exception) { return false; } return true; } 回答1: I concur with the comment of @sll but, to

GETDATE() throwing exception

六眼飞鱼酱① 提交于 2020-01-14 07:58:44
问题 I am creating a simple application where i am using MSAccess as database. When i am trying to retrieve the data using below query - i am getting exception undefined function GETDATE() select * from tempdata where dateissue between DATEADD(MM, DATEDIFF(MM, 0, GETDATE()) - 0 , 0) and DATEADD(MM, DATEDIFF(MM, 0, GETDATE()) + 1, - 1 ) can't we use the sql inbuilt methods inside c# code ?? if so how do i solve this problem 回答1: Now that you moved past the first problem (there is no GETDATE()

Export value from Excel worksheet to Access record

梦想的初衷 提交于 2020-01-14 05:54:33
问题 I have an excel spreadsheet that contains the primarky-key/id value for a record in a table in an access database. I would like to export specific data from certain cells in the spreadsheet to certain fields in the corresponding record in the table. Is this possible, any help would be greatly appreciated. Many thanks Noel 回答1: You can use ADO with Excel and Access. You can either open an Access recordset and update or add fields (columns) and records one by one, or you can use an SQL

VBA code to loop and update MS access database column from Excel

拜拜、爱过 提交于 2020-01-14 04:42:05
问题 Background: I have an excel spreadsheet that retrieves data from an MS Access database. That code works fine. It retrieves records that have the "comments" field as blank. Users update the comments field in Excel and click a button. The Ask: Once the button is clicked, the VBA code must loop through all retrieved records in my excel sheet and those records that are marked "completed" in excel must update the same comment in the "comments field" in my database. I have looked at this article

What is a simple but somewhat effective way to “obfuscate” numeric values?

梦想的初衷 提交于 2020-01-14 04:41:06
问题 Let's say I have an Access database table that has 2 columns: one is ID (from 1 to 20000, sequentially and each is unique) and one is Value (any number from 0 to 500). How do I obfuscate the Value field (using ID or not using ID) in a simple but somewhat effective way? I expect something slightly more effective than ROT13 obfuscation but not so complicated that decoing needs more than one line of code. The decoding is done in C# code. The obfuscation is done via calculated field in Access. I

Dynamic text box content on an Access continuous form

你离开我真会死。 提交于 2020-01-14 03:13:25
问题 I have a table (id, Name, Surname, Address etc.). All the fields (except id) can be NULL. I want to make a form where I can find all the records that have at least a NULL field. I have made a query (with the query designer) and then I "linked" a continuous form to it. In the Detail part of the form I put a textbox ID (linked to the query) so I can have all the IDs that have at least a field NULL. So far so good, it works. I would like to inform the user, after the ID, which fields are blank.

Access VBA to delete a file to the recycle bin?

廉价感情. 提交于 2020-01-14 02:59:10
问题 Using the following code delete's my file, but it doesn't go to the recycle bin - does code exist that will send it to the recycle bin? Should I use ".Move" ? If MsgBox("DELETE:" & Chr(10) & Forms("frmtbl").f_FullPath & Me.f_FileName & " ?", vbYesNo) = vbYes Then 'Kill Forms("frmtbl").f_FullPath & Me.f_FileName Dim objFSO As Object Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.DeleteFile (Forms("frmtbl").f_FullPath & Me.f_FileName) DoCmd.Close acForm, Me.Name Else MsgBox

Split time intervals on the hour

拥有回忆 提交于 2020-01-14 01:43:29
问题 I have a data set: tbldataid TS EndTS > HX32.3401 10/2/2017 11:49:34 PM 10/3/2017 12:01:57 AM > HX32.3403 10/3/2017 12:02:48 AM 10/3/2017 12:08:34 AM > HX32.3425 10/3/2017 2:50:57 AM 10/3/2017 2:50:58 AM > HX32.3428 10/3/2017 4:06:15 AM 10/3/2017 6:09:19 AM I would like to to essentially 'split' these intervals on the hour, such as: tbldataid TS EndTS HX32.3401 10/2/2017 11:49:34 PM 10/2/2017 11:59:99 PM HX32.3401 10/2/2017 12:00:00 PM 10/3/2017 12:01:57 AM HX32.3403 10/3/2017 12:02:48 AM 10

Build an Access executable from command line?

ε祈祈猫儿з 提交于 2020-01-13 19:57:29
问题 We have a legacy Access application that is still in production. I would like to at least have an automated build for it. Can you build access exe's from the command line? Even better, there wouldn't by any chance, be an MSBuild target for Access would there? 回答1: a = CreateObject("Access.Application") If a.SysCmd(603, PATH_TO_BXB_FILE, PATH_TO_BXE_FILE) = 0 Then MsgBox("Fail to compile to MDB file") End If The 603 argument of syscmd is undocumented. It will fail for a number of reasons, for