ms-access

Access Data Project Importing CSV File In VBA

血红的双手。 提交于 2019-12-28 12:43:37
问题 Every now and then I come across a problem with an old system one of my colleagues has developed. They tend to have thousands of lines of code to do a simple thing like importing a csv file. Currently the vba process is: open excel application create new worksheet populate the csv file into excel add the header names to the file save the worksheet as a new excel file imports the file into the access data project sql table. Process the data What I want to do with it is: import the csv to the

MS Access 2007 - Cycling through values in a list box to grab id's for a SQL statement

梦想的初衷 提交于 2019-12-28 06:52:05
问题 Lets say I have two tables, one for transactions, and another table who's primary key is the foreign key in the first table, and this relationship simply associates locations to transactions. I have a form with a list box that shows all the potential locations, so that the user can open some dashboard forms that only pertain to a given location. So I know how to pass the data from the selection to the dashboard, however I would now like the user to have the capability to select multiple

Update an Access linked table to use a UNC path

て烟熏妆下的殇ゞ 提交于 2019-12-28 06:48:45
问题 I have an Access 2010 database A.mdb with a list of tables, one of which is a linked table, linked from another Access database B.mdb on the same server. These databases are on a development machine xxx.xxx.xxx.xxx , which is mapped on my computer as R:// , and they are afterwards published online on a yyy.yyy.yyy.yyy server. If I want to work on the database locally, I need to change the link to the table. But if I change it via filesystem (using the "Linked Table Manager"), the link becomes

Does Microsoft Jet DB work with Entity Framework?

不想你离开。 提交于 2019-12-28 06:45:39
问题 In this forum here , someone mentions that Entity Framework does not work with Access (Jet DB - .mdb). However it seems that there is a provider for Jet DB as described here Which makes me think that the only thing I need with Entity Framework is to define the follwing before I define the models: <connectionStrings> <add name="ProductContext" providerName="Microsoft.Jet.OLEDB.4.0" connectionString="Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;"/> </connectionStrings> Does

Why one Public OleDbConnection is deprecated? Alternative to solve the bug: too many connections opened

我怕爱的太早我们不能终老 提交于 2019-12-28 06:34:44
问题 I have to work with a Project made by another developer. A project Win-Form with Visual-Basic code, with MS-Access as db and some OleDbConnections. There is a bug: sometimes the application can't open the OleDbConnection because the max number of connections has been reached on the db. I know the best way to use the connections is this: Using cn As New OleDbConnction(s) ... cn.Close() End Using But in the project there are many classes to work with the db, and in many of these classes there

Record cannot be read; no read permission on 'MSysObjects'

陌路散爱 提交于 2019-12-28 06:23:07
问题 I'm trying to get a list of all tables from an Access 2007 ACCDB format database using Excel VBA. I have followed this post: How can I get table names from an MS Access Database? Using: SELECT MSysObjects.Name AS table_name FROM MSysObjects WHERE (((Left([Name],1))<>"~") AND ((Left([Name],4))<>"MSys") AND ((MSysObjects.Type) In (1,4,6))) order by MSysObjects.Name but I'm getting this error. Record cannot be read; no read permission on 'MSysObjects' I want to be able to get the table names

Save password for ODBC connection to MS SQL server from MS Access 2007

非 Y 不嫁゛ 提交于 2019-12-28 06:16:05
问题 I am in charge for migrating old Access 2007 project to MS SQL server 2008 Express. The first stage is to move all the data from MS Access database to SQL server while keeping the Access forms and reports at the client. So, the data are now moved, an SQL server user (for accessing only that particular database) created, and the tables are linked the Access database via ODBC connection. However, there's one nuisance that should be somehow solved: the Access regularly asks for the user password

insert full ADO Recordset into existing ACCESS table WITHOUT LOOP

可紊 提交于 2019-12-28 05:54:34
问题 I have a filled ADO recordset in my VBA module. I also have a table in ACCESS that has exactly the same structure as the recordset. Now I fill the table using a loop (which is fine) going through each dataset record. What I am wondering: is there a way to insert an entire recordset into the access table? (and more importantly: would this be significantly faster) 回答1: Here's a basic example (run from excel in this case) which illustrates using a disconnected recordset to add records. Sub

Pivot on multiple fields and export from Access

拟墨画扇 提交于 2019-12-28 04:34:20
问题 I have built an access application for a manufacturing plant and have provided them with a report that lists different data points along a process. I have a way to generate a report that looks like the following. Batch Zone Value1 Value 2 etc. 25 1 5 15 25 2 12 31 26 1 6 14 26 2 10 32 However, there is demand to view the data in a different format. They would like one line per batch, with all data horizontal. Like this... Zone 1 Zone 2 Batch Value1 Value2 Value1 Value2 25 5 15 12 31 26 6 14

Using Start Date and End date in Access query

我只是一个虾纸丫 提交于 2019-12-28 04:34:10
问题 Please can someone help me with this Access query that I am trying to create? I have a table with a list of projects and their start date and end date. What I need is a query that shows the breakdown of project days by month for each project, for example: PROJECT Jan Feb Mar AAAAA 7 28 2 ...etc, where the numbers are the project days calculated based on the start date and end date. For example, in the above query, project AAAAA would have a start date of 24/01/2012 and end date of 02/03/2012