ms-access

Click a button on an MS Access form from C# using Access Interop

Hi, I can connect to the access database and run functions etc from c#, I can even get a hold of the button I need to click, but I can't make it think it's been clicked. nonManagedDb.DoCmd.OpenForm("frmMaintenance", Access.AcFormView.acNormal, MissingVal, Access.AcFormOpenDataMode.acFormReadOnly, Access.AcWindowMode.acWindowNormal, Mis...

I am using click-once deployment but have a new access file but need the old one.

This is the situation. I have a windows form app that uses an access database to store the information. Everything has been going good. Now I am going to release a new version with an updated access file (2 new tables, 1 old table with new column). But the people that have been using the app I don't want them to loose their informati...

ODBC continually prompts for password

I have an application built in Access 2003 that uses a system DSN ODBC to connect to a SQL Server. The ODBC uses SQL authentication. When the application is started, the user is prompted to authenticate into the database. I have another computer set up within the same domain that has Access 2007 installed on it. I log in using the same ...

MS Access 2007: Specify Max Length for TextBox on a Form

How do I specify Max Length for TextBox on a Form? ...

.NET make a copy of an embedded file resource to the local drive

Hi, i'm new to the realm to working with Files in .NET I'm creating a WPF application in VB.NET with the 3.5 Framework. (If you provide an example in C#, that's perfectly fine.) In my project I have a Template for an MS Access database. My desired behavior is that when the users clicks File-->New, they can create a new copy of this t...

Using pyodbc to insert rows into a MS Access MDB, how do I escape the paramaters?

Hi, I'm using pyodbc to talk to a legacy Access 2000 .mdb file. I've got a cursor, and am trying to execute this: c.execute("INSERT INTO [Accounts] ([Name], [TypeID], [StatusID], [AccountCat], [id]) VALUES (?, ?, ?, ?, ?)", [u'test', 20, 10, 4, 2]) However, doing so results in pyodbc.Error: ('HYC00', '[HYC00] [Microsoft][ODBC Mic...

violation of primary key constraint .Cannot insert duplicate key in object using ADO

Hi All we are working on a users apllication using Access2003(VBA) as software language and SQL Server 2005 as database. We are using ADO method and we encounter a problem. when users create new record in a ADO Screen and they want to save the record after implementing it they receive this error : error -2147217873 violation of primary ...

Starting a VC++ .exe from MSAccess

For a complex calculating problem we use an VC++ module (.exe). For the users we have build an ms Access application as user interface. After input the calculating module should start and do its job. The result is again imported in Ms Access. However we work wit dBase files (.dbf) as data files. The calculating unit works fine by its ow...

MS Access Draw line around detail section that can grow

This really shouldn't be hard, I just can't figure out how to do it. I am making a proposal report that needs to have a border around it. The problem is to get the vertical lines on the side. I can't figure out how to get a line to grow and shrink based on the height of the detail section. I have used Crystal reports and sure wish Mic...

MS Access: Permission problems with views

"I'll use an Access ADP" I said, "it's only a tiny project and I've got better things to do", I said, "I can build an interface really quickly in Access" I said. </sarcasm> Sorry for the rant, but it's Friday, I have a date in just under two hours, and I'm here late because this just isn't working - so, in despair, I turn to SO for hel...

Displaying an image.

I am using vb.net running a backend MS.Access database and I am wondering what is the code that I can use to display a picture of an image when the field name is selected. My MS Access "field" name is Cars_Types: in the files I have the data "GM, Chrysler, Toyota, Honda, and Ford". The name of my database is ModelCars.accdb The pict...

Is there a way to sync (two way) tables betwen a mysql server and a local MS Access?

Help me figure out a solution to a (not so unique) problem. My research group has gps devices attached to migratory animals. Every once in a while, a research tech will be within range of an animal and will get the chance to download all the logged points. Each individual spits out a single dbf and new locations are just appended to the...

Access Database using do.cmd openform where clasue - returning all values

DoCmd.OpenForm "Database Search", acFormDS, , srcLastName & "AND " & srcFirstName This is only a small sample of the where clause - there are many more terms. First, there is a set of If, Then type tings up top that set the variable srcLastName and srcFirstName to some value. These are not the problem and work just fine. The trouble i...

MS Access Force report footer to bottom of page

I am trying to make a report for a proposal. I would like to keep a professional look and always force the terms section to the bottom of the page. I could use the page footer but I only want the terms to show on the last page. My idea is somehow with VBA to set the height of a dummy group such that it forces the report footer to the bo...

SQL - Query range between two dates (NON-VBA)

I see various topics on this around stack overflow but none that fit the contect of MS-Access... Given a starting date and an ending date, is there a way through SQL to return records for each given month within the time frame? EG: A record has a Start Date of #1/1/2010# and an End Date of #1/31/2010# Running the query against that s...

Can't connect SQL 2008 Express to Access project

I just installed SQL 2008 Express and want to create an Access project (ADP). When I get to the Microsoft SQL Server Database Wizard in Access and after clicking on next to create the database I get this message: The new database wizard does not work with the version of Microsoft SQL Server to which you Access project is connec...

DATE lookup table (1990/01/01:2041/12/31)

I use a DATE's master table for looking up dates and other values in order to control several events, intervals and calculations within my app. It has rows for every single day begining from 01/01/1990 to 12/31/2041. One example of how I use this lookup table is: A customer pawned an item on: JAN-31-2010 Customer returns on MAY-03-...

Why MS Access adodb in .NET returns 34 in fieldcount when table has 42 fields ?

Why MS Access adodb in .NET returns 34 in fieldcount when table has 42 fields ? I see 42 fields in table of my MS Access mdb database. But ADODB layer in .NET sees only 34 fields. The Outofrange exception occures when I am calling method getOrdinal("FieldName") of reader class. Is it something I am missing in setting up connection, lic...

hibernate configuration property file MS Access database

Hi all, I have MS Access database and i want to use hibernate as a persistent layer for my application. So needed a sample hibernate config file entries for MS Access database. Thanks ...

Subform has default view set to Continuous - Cantmake height expand Automatically

Hi, I have a subform on a form and its default view is set to 'continuous form'. How do I make the form, and thus its parent form, expand its height automatically to accommodate all applicable records. Thanks in advance to anyone who can help Noel ...