ms-access

Alternative for Report.Load() event in Ms Access 2003

I created an application in Access 2003 and continued to work on it on another computer with Access 2007. I created a report with a method that loads data from a recordset to some unbound fields on the report. This method takes three parameter values from three fields on the report. The report's data source is a query. I call the method...

Programming against Access 2007?

Hi, How do I program against Access 2007 in C#? I don't see any VSTO templates for it. All I need to do is define a schema, let the user fill in the data on their own, and then read all of the data they entered back into my program. The reading part looks easy...how would I programmatically create a MS Access Database, and how would I...

MS Access row number, specify an index

Hi, Is there a way in MS access to return a dataset between a specific index? So lets say my dataset is: rank | first_name | age 1 Max 23 2 Bob 40 3 Sid 25 4 Billy 18 5 Sally 19 But I only want to return those records between 'rank' 2 and 4, so my results set is Bob, ...

Access Database, Connection string jiggery pokerery!

Hi, I am trying, from my c# codefile to access an Access Database. If I use the: SqlConnection connection = new SqlConnection(connectionString) with the connection string being: connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\testing_dev\sm_development\App_Data\SMWeb.mdb" I get an error when I try and create a...

ADO Batch Update in Access VBA

I am trying to use batch updates in Access VBA. My code works fine when I update after every operation, but fails when I try to operate on multiple rows. The exception I get is "Run-time error '-2147217887 (80040e21)': Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." ...

Minimum permissions required for an updatable query (Access Project)

In an Access Project (ADP), with a SQL backend, what are the minimum permissions required for Access to be able to update records returned from a view bound to a form, yet prevent a direct SELECT on the underlying table? For instance: Table: Table1 Columns: ID, Column1, Column2, Column3, Column4 View: View1 SELECT ID, Column1, Column2...

Migrating an Access Database into SharePoint 2007.

To my surprise and delight I read that an adminsitrator can import (nearly directly) an Access 2007 database into a sharepoint site. Automagically, the database in transformed into lists and views with some table lookup thrown in for good measure. With Access 2007 installed on the client machine, even the forms and what not can still be ...

Querying Oracle with a pick list

I have an oracle database that I have read-only access (with no permission to create temporary tables). I have a pick list (in Excel) of 28000 IDs corresponding to 28000 rows in a table which has millions of records. How do I write a query to return the 28000 rows? I tried creating a table in access and performing a join through ODBC b...

Performance of MS Access when JOINing from linked tables in different servers?

If I have an MS Access database with linked tables from two different database servers (say one table from an SQL Server db and one from an Oracle db) and I write a query which JOINs those two tables, how will Access (or the Jet engine, I guess?) handle this query? Will it issue some SELECTs on each table first to get the fields I'm JOIN...

MS Access library for python

Is there a library for using MS Access database in python? The win32 module is not as easy as the MySQL library. Is there a simpler way to use MS Access with Python? ...

In VBA, cannot use Access.Application object

This does NOT work: Sub X() Dim A As Access.Application Set A = CreateObject("Access.Application") 'Do Stuff End Sub However, this DOES work: Sub X() Dim A As Object Set A = CreateObject("Access.Application") 'Do Stuff End Sub I know they do virtually the same thing, but can anyone tell me how to make an acc...

C# / Access Getting Primary Keys from Access 2003

I'm using OleDb to interact with an Access database, and I'm trying to find out how to get the primary keys of each table, but in such a way that they are associated with the tables. In other words, I don't just want a flat list of the primary key column names--I want to be able to determine which table they belong to. Any idea how to d...

Converting Rows to column

Hi, let's assume I have a table with columns such as Cost Rate Repair 12 Repair 223 Wear 1000 Wear 666 Fuel 500 Repair 600 Fuel 450 Wear 400 and I want this data as columns(Repair,Wear,Fuel) as Repa...

MS Access HW Query Missing Obvious Error Somewhere?

Final query that I have to do and I'm getting an error stating that I have not specified OrdID's table: Here's what I have: SELECT Last, OrderLine.OrdID, OrdDate, SUM(Price*Qty) FROM ((Cus INNER JOIN Orders ON Cus.CID=Orders.CID) INNER JOIN OrderLine ON Orders.OrdID=OrderLine.OrdID) INNER JOIN ProdFabric ON OrderLine.PrID=ProdFabric...

How to get today record min (time) and previous day record max (time)

Using MS Access database I want to display today record min (time) and previous day record max (time) Table PERSON ID CARDEVENTDATE CARDEVENTTIME 5008 20090805 080000 5008 20090805 140000 5008 20090809 180000 5008 20090809 220000 5008 20090813 090000 5008 20090813 ...

cannot delete rows from a remote access database

I want to delete a table from a access database which is present on the web server. The query works fine on testing locally. But the same query gives an error . that could not delete some tables please help me.... ...

Problems with More than 1 Left joins in MSAccess

This is related to my previous question More than 1 Left joins in MSAccess The problem is that I have 3 left joins followed by an AND operator to check 1 condition. If I run, then I am getting an error "Join Expression not supported". The query goes like this: SELECT * FROM(( EMPLOYEE AS E LEFT JOIN DEPARTMENT AS D ON E.EID=D.EID) ...

# in SQL Query

I have somebody elses code (C# ASP.Net) which contains the following query: string query = "SELECT distinct(destinations.name) as Destinations FROM destinations, flights WHERE destinations.d_ID = flights.d_ID AND flights.Date = #" + date.ToShortDateString() + "#"; I could not find w...

can I prefix columns in a join in jet (access)?

I've got a demo app, using php with an Access/Jet backend. I've got these (simplified) tables: People ------ ID BankID // foreign key in Banks Name Address Banks -------- ID Name Address I'm doing a join: SELECT * FROM People LEFT JOIN on People.BankID = Banks.ID What's the best way to avoid name clashes? This works: SELECT Pe...

Group by, Order by, sub queries - Performance Problem for getting the previous row value.

I am using MS ACCESS 2003 TABLE NAME –> tmp_cardevent PERSONID CARDEVENTDATE CARDEVENTTIME 5008 20090805 080000 5008 20090805 140000 5008 20090809 180000 5008 20090809 220000 3405 20090805 080000 3405 20090805 180000 3405 20090809 070000 3405 ...