ms-access

java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Exception occurring. Why?

[亡魂溺海] 提交于 2019-12-25 04:57:23
问题 I have created an MS Access database and assigned a DSN to it. I want to access it through my Java application. This is what I am doing: public class AccessDbConnection { public static void main(String[] args) { System.out.println("**ACCESS DB CONNECTION**"); try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // for MS Access ... MS access driver loading String conURL = "jdbc:odbc:sampleDNS"; Connection con = DriverManager.getConnection(conURL); Statement statement = con.createStatement();

Avoid duplication without using Indexed fields and 'no duplication'

浪尽此生 提交于 2019-12-25 04:55:31
问题 I'm looking for advice as to the correct method for form design to prompt the user entering data to avoid duplicated records. For example: The user enters profile information in the fields firstName surName Its highly possible for numerous profiles to have the same name (e.g John Smith, so indexing fields isn't possible to avoid duplicates). Its possible for the user to enter the same record twice if they are not prompt/warned not to do so. What is considered the best method to prompt users

How do I make an Access Form automatically open to a user's data?

半腔热情 提交于 2019-12-25 04:55:17
问题 I am trying to write VB code that would allow Access to recognize the computer ID of the person opening the database, open a form, and filter to the records assigned to the user. Does anyone know how to accomplish that? 回答1: An API to get the user name is probably better than using Environ. If the name is available in a table, you can use DLookUp to get an ID, which can be used with the Where argument of the OpenForm method of the DoCmd object to open a filtered list. 回答2: You can use Environ

Combining two MS Access queries

雨燕双飞 提交于 2019-12-25 04:49:05
问题 I have this query: SELECT "I1" & "," & "I2" AS Item_set, Round(Sum([T1].Fuzzy_Value)/Count(*),15) AS Support FROM (SELECT * FROM Prune AS t WHERE t.Trans_ID IN (SELECT t1.Trans_ID FROM ( SELECT *FROM Prune WHERE [Nama]="I1") AS t1 INNER JOIN (SELECT * FROM Prune WHERE [Nama]="I2") AS t2 ON t1.Trans_ID = t2.Trans_ID) AND t.Nama IN ("I1","I2")) AS T1; And ttrans query SELECT Count([Trans_ID].[Trans_ID]) AS Expr1 FROM Trans_ID; I need to change Count (*) from : SELECT "I1" & "," & "I2" AS Item

Query does not include the specified expression

℡╲_俬逩灬. 提交于 2019-12-25 04:48:53
问题 I've been stuck with a problem in MS Access. I am trying to add a collumn but I got a error. "Your query does not include the specified expression 'BorgA' as part of an aggregate function." I am using this Query: SELECT SUM(A.TotaalPrijs) As TotaalPrijs, A.AutoNR, A.AutoKlasse, MAX(A.Factuur.Dagen) as Dagen, A.Prijzen.dag125KM as PrijsPerDag, A.Prijzen.ExtraKM As PrijsPerExtraKM, A.Factuur.FactuurNR, A.Factuur.KlantNR, A.Factuur.Begindatum, A.Factuur.Einddatum, A.Factuur.Borg, Gegevens

Input the date of DateTimePicker in ms access using a query VB.NET

耗尽温柔 提交于 2019-12-25 04:45:28
问题 An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll Additional information: Syntax error (missing operator) in query expression '7/27/2016 6:20:48 PM'. I got this message every time I click the save button on my program. here's the code: Public Sub savetoDB() Dim mydate As DateTime mydate = Me.dtpDateDel.Value con.Open() Dim sqlQry As String = "INSERT INTO [tbl_Monitoring] ([Truck Plate No], [Driver], [Helper], [Date of Delivery], [Product], [Payment]

Reformatting a Phone Number in Access

℡╲_俬逩灬. 提交于 2019-12-25 04:45:12
问题 I'm in the process of uploading data into an access database, and some of the data has phone numbers listed in the format of 9999999999 and others are listed as 999-999-9999 . I would like for all the numbers to read 9999999999 so that way they can be cross referenced. I've been trying to run an update query on the numbers that are in the undesired format, but I am having no success. Blow is how I have the query set up: Field: Wireless Number Table: Table to be updated Update to: Mid([Table].

Access query to get rows for a range of times (disregarding date)

最后都变了- 提交于 2019-12-25 04:44:46
问题 I have this table : Number Fall Time Accuracy ------------------------------------------------------- 1 01/01/2010 10:00:00 0.3 2 15/03/2011 10:30:00 0.123 3 31/01/1994 11:00:00 0.2 I want the fall time between 10:00:00 - 10:59:59 (Don't care about day/month/year) I want this result : Accuracy ----------------- 0.3 0.123 My try : "SELECT Accuracy FROM Ikun WHERE PARSE(Fall_Time AS time) >= '10:00:00' AND PARSE(Fall_Time AS time) <= '10:59:59')" The error : Missing operator syntax error in the

verify if username exist to show the database or sho table to field

旧街凉风 提交于 2019-12-25 04:43:25
问题 I have this table which contains a few's questions: <table> <tr><td><b>Utilizador:</b></td><td><asp:Label ID="username" runat="server"></asp:Label></td></tr> <tr><td><b>Telefone da Empresa:</b></td><td><asp:TextBox ID="empresa" runat="server" MaxLength="13"></asp:TextBox> (Exemplo: +351234925xxx)</td></tr> <tr><td><b>2º Telefone:</b></td><td><asp:TextBox ID="empresa2" runat="server" MaxLength="4"></asp:TextBox> (Exemplo: xxxx)</td></tr> <tr><td><b>Telemóvel:</b></td><td><asp:TextBox ID=

automating decompile / recompile in ms-access

北慕城南 提交于 2019-12-25 04:39:14
问题 my front end from time to time is getting larger. i am building new reports and forms. i know that remou suggests to decompile and compile every so often to make sure nothing is corrupt. can i automate this decompile/ recompile process? 回答1: What kind of automation do you have in mind? Edit : If you intend to automate this, don't automate decompile in isolation; include backup and compact with decompile. You could try something like this as one line in a BAT file, changing the paths to match