ms-access

Connecting to access database from linux

旧时模样 提交于 2019-12-30 08:07:28
问题 I've created my application and tested it under windows, which writes/reads to/from a access DB file. But in the real world it will be ran in the linux environment, and I have a big issue now, it appears that there are no drivers for linux to access ms acess db, here is how I make the connection now : private static Connection getConnection() { if (connection == null) { try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); String conStr = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *

In Access97 SQL how do I return a range of rows?

做~自己de王妃 提交于 2019-12-30 07:08:24
问题 I have an Access97 database (unfortunately) and I am querying it over ODBC. I want to construct a query that will return me J ordered rows starting at offset K. Right now for a related operation I am using a sub-query and the TOP keyword, this works fine but I don't think I can use it for this new operation I am trying to perform. I am wanting to do this because I want to add some form of paging to some software. Ideally the user interface should be able to say, give me 50 records, starting

MS Access SQL LIKE query from C#

狂风中的少年 提交于 2019-12-30 06:54:30
问题 I have this query for Ms Access and im using C# and Ole DB commands. It works on Ms Access but when I'm passing the query from C# using OleDB, nothing happened. Anyway here's my code: SQL query SELECT * FROM tblIssue WHERE id LIKE '*2*' AND dateChecque LIKE '**'AND + issueTo LIKE '**' AND byTheName LIKE '**' AND bankName LIKE '**' AND accountNo LIKE '**' + AND checqueNo LIKE '**' AND amount LIKE '**' AND being LIKE '**' AND whoDeleted LIKE '**' + AND whyDeleted LIKE '**' AND dateCreated LIKE

ODBC connection to MS-Access on Ubuntu

非 Y 不嫁゛ 提交于 2019-12-30 06:49:47
问题 One of our employees created a Microsoft Access Database and has built a Joomla! module around it. It is currently running on a WAMP server, with an ODBC connection to the accdb file. How can I create an ODBC connection on Ubuntu for the Access database? At this point, I'm open to having the DB live locally on my Ubuntu server, or on an SMB share somewhere. Moving it from Access to MySql has already been proposed. It may come down to that, but I'm really being pressured to find another option

How do I get a single file name out of a File Dialog object in VBA (for MS Access 2007)?

北慕城南 提交于 2019-12-30 06:33:48
问题 How do I change my code to get the file name instead of the directory name? openDialog.InitialFilename gives me the directory name. openDialog.FileName gives me the error "Method or data member not found". Private Sub btnEditPhoto_Click() If (txtImageName > "") Then Application.FollowHyperlink txtImageName Else Dim openDialog As Office.FileDialog Set openDialog = Application.FileDialog(msoFileDialogFilePicker) openDialog.Filters.Clear openDialog.Filters.Add "JPEG Files", "*.jpg" Dim

is there TRUNCATE in Access?

安稳与你 提交于 2019-12-30 05:53:12
问题 I have a table in an Access database with an autonumber field. When I delete all the records from the table, the autonumber remembers the last number. Does Access have something similar to SQL Server's TRUNCATE TABLE MyTbl ? If not, how to start with 1 after I delete the table's records? 回答1: Access SQL does not have anything like TRUNCATE TABLE . You can use an ADO connection to execute a DDL statement which resets the autonumber field's "seed" value. So you could do this with VBA code, and

Making “DoCmd.GoToRecord” function work on a subform

核能气质少年 提交于 2019-12-30 04:10:23
问题 I have been using the function DoCmd.GoToRecord , , acNewRec successfully for creating and moving to a new record within a subform (with a table as the source). However, when I try to do the same from the parent form, this does not work. I have tried different approaches, including: Me.sbfrm_subform.Controls("ctrName").SetFocus DoCmd.GoToRecord , , acNewRec which only sets the focus on the control (ctrName), but fails to add and go to a new record, or DoCmd.GoToRecord acDataForm, Me.sbfrm

Code To eliminate need to enter password

穿精又带淫゛_ 提交于 2019-12-29 10:07:09
问题 I have an access form that pulls together data from different tables. Some of them require a username and password be entered. This is going out to other users and I would rather them not have to enter the information over and over. Is there a code that I can use that whenever it prompts for a password to have it automatically logged in? Currently I already have a connection for one DB connection that runs whenever the DB is opened. It looks like: Public Function StartUp() Dim cnn As ADODB

How to filter by what the user enters in a textbox, except show all if it's empty

那年仲夏 提交于 2019-12-29 09:51:28
问题 I want to filter a form with a query, so that the user has to input what he would like to search in a textbox and it gets filtered out. There are some empty fields, and these should show if the user has not searched for anything yet, but if he searches those should not be shown anymore. With this code, the searching works, but it shows the empty fields: Like("*" & [Forms].[BerichtSuche].[efTitle] & "*") OR Is Null I tried this, but then nothing at all is shown: If(Len([Forms].[BerichtSuche].

Identify a 3-column PK duplicate in VBA Access

吃可爱长大的小学妹 提交于 2019-12-29 09:50:29
问题 I cannot seem to figure out the best way to identify whether my record table already has the unique 3-column combination of the data using VBA. My table is as follows: CREATE TABLE sometable( col1 NUMERIC, col2 NUMERIC, col3 NUMERIC, col4 NUMERIC, Primary Key(col1, col2, col3) ); Now in my form I'm adding values into the table (ie. user fills up 3 fields, clicks an add button and it inserts to the table). If row of data is already there, pressing the add button does nothing. What I want to