ms-access

How do I create a Jet ODBC link to a SQL Server view with periods in the field names?

I need to create an ODBC link from an Access 2003 (Jet) database to a SQL Server hosted view which contains aliased field names containing periods such as: Seq.Group In the SQL source behind the view, the field names are encased in square brackets... SELECT Table._Group AS [Seq.Group] ...so SQL Server doesn't complain about creatin...

Exporting MSAccess Tables as Unicode with Tilde delimiter

I want to export the contents of several tables from MSAccess2003. The tables contain unicode Japanese characters. I want to store them as tilde delimited text files. I can do this manually using File/Export and, in the 'Advanced' dialog selecting tilde as Field Delimiter and the Unicode as the Code Page. I can store this as an Export...

Microsoft Access - SQL - Internal Foreign Key

Does MS Access 2007 support internal foreign keys within the same table? ...

How can I open an Access DB via ADO so that I can write, but others can only read?

From the documentation, I would expect adModeShareDenyWrite to be the way, but it's not working right. I'm using an Access database via ADO. My connection string says Mode=8, which is adModeShareDenyWrite. But when I try to delete a row from a table, I get: Unspecified error, Description:Could not delete from specified tables., Sou...

How can I get the currently logged-in windows user in Access VBA?

I found this via google: http://www.mvps.org/access/api/api0008.htm is this the best way to do it? ...

View MS Access Report in .net ReportViewer control

Is it possible to view an MS Access report in the .Net ReportViewer control? ...

Operation must use an updatable query. (Error 3073) Microsoft Access

On some Microsoft Access queries, I get the following message: Operation must use an updatable query. (Error 3073). I work around it by using temporary tables, but I'm wondering if there's a better way. All the tables involved have a primary key. Here's the code: UPDATE CLOG SET CLOG.NEXTDUE = ( SELECT H1.paidthru FROM CTRHI...

Table Creation DDL from Microsoft Access

Is there any easy way to retrieve table creation DDL from Microsoft Access (2007) or do I have to code it myself using VBA to read the table structure? I have about 30 tables that we are porting to Oracle and it would make life easier if we could create the tables from the Access definitions. ...

How to create an automatically managed "last update" field with Microsoft Access

Originally I thought to ask if there would be an easy way to provide an automatically managed last update field with MS Access. After some googling I found following approach: Private Sub Form_Dirty(Cancel As Integer) Me.Last_Update = Date() End Sub which seems to do the job. I thought to share it with others also (and if somebo...

code igniter / cakephp and ms access

I'm trying to use Microsoft Access as the db for a demo project that I'm thinking of doing in either Code Igniter or CakePHP. Ignoring the possibly folly of using MS Access, I haven't been able to figure out precisely how the connection string corresponds to the frameworks' db settings. In straight php, I can use this code to connect to ...

MS Access questions - Scalability / indexing / transactions

A few questions on MS Access databases - Size: Are there limits to the size of an access database? The reason i ask is that we have an access database that has a few simple tables. The size of the db is about 1GB. When I do a query on it, i see it taking over 10 minutes to run. With proper indexing, should MS Access be able to hand...

Get the Primary Key of a new Entry

I have a number of child tables that have a foreign key to a parent table. How do I add an entry in the parent table and get the primary key of that entry, so that I can then enter rows in the child tables that point to the entry in the parent table? I'm doing this in a MS Access Database from a C# application. ...

How do I create a decimal field in Access with Alter Table?

I want to programmatically create a new column in an Access table. I've tried many permutations of "ALTER TABLE MyTable Add MyField DECIMAL (9,4) NULL;" and gotten "Syntax Error in Field Definition". I can easily create a number field that goes to a Double type, but I want decimal. I would very strongly prefer to do this in a single ...

Using top clause in Access sub report

I'm making a report in Access 2003 that contains a sub report of related records. Within the sub report, I want the top two records only. When I add "TOP 2" to the sub report's query, it seems to select the top two records before it filters on the link fields. How do I get the top two records of only those records that apply to the co...

Upsizing a split Access database

Hi, I need to upsize a split Access database, i.e., one that's currently split between tow mdb files, a front-end and back-end. I see many webpages that in essence say, "run the Upsizing Wizard." My first, very basic question: Should I be running this wizard in my front-end mdb or my back-end mdb? I assume I don't want to link main mdb...

Access Alter Table "Allow Zero Length"

I'm working with an old Access database (yes, it's very ugly and I hate it). I need to modify some of the columns from a VB app that I'm creating. I have most the modifications setup correctly, but I'm fighting with the fact that modifying a column to text has it default to "Allow Zero Length" to false. SO ALTER TABLE [Applicant Tabl...

@@IDENTITY after INSERT statement always returns 0

I need a function which executes an INSERT statement on a database and returns the Auto_Increment primary key. I have the following C# code but, while the INSERT statement works fine (I can see the record in the database, the PK is generated correctly and rows == 1), the id value is always 0. Any ideas on what might be going wrong? ...

Access date bug- dd/mm automatically got changed to mm/dd

I coded something using Date statement in ms-access vba. It was working fine till the start of this month. But now I am seeing a very peculiar bug in access vba that the Date has automatically changed the format from dd/mm/yyyy to mm/dd/yyyy. Has anyone else encountered the same problem ...

If DoCmd.SendObject fails?

I am using DoCmd.SendObject to send emails from MS access 2003. It opens the outlook with all relevant fields filled. But the user may not choose to send the email at that time. In that case, a prompt 'Send Action was cancelled' appears. Is there a way to catch this non-sending of email by user ...

How do you use version control with Access development?

I'm involved with updating an Access solution. It has a good amount of VBA, a number of queries, a small amount of tables, and a few forms for data entry & report generation. It's an ideal candidate for Access. I want to make changes to the table design, the VBA, the queries, and the forms. How can I track my changes with version con...