ms-access

Using SQL to create table joins in MS Access

情到浓时终转凉″ 提交于 2019-12-25 04:38:08
问题 I'm REALLY new to SQL and I'm really struggling with all but the simplest of joins - especially in MS Access. At this stage, all I want to do is create a query from two tables: 'tblUsers', with columns 'UserID' and 'User', and 'tblPayments' with columns 'PaymentID', 'User' and 'Authoriser'. I want my query to contain all of this data and also to have columns 'UserID' and 'AuthoriserID', both of these ID numbers being taken from 'tblUsers', but clearly one will relate to the User and one to

OleDbException: Data type mismatch in criteria expression

不打扰是莪最后的温柔 提交于 2019-12-25 04:38:07
问题 I read data from MS Access using C#. But get the OleDbException trying to execute such query: SELECT * FROM Flats WHERE Flats.VersionStamp <= [theDate] AND Flats.Flat=[theFlat] OleDbException: Data type mismatch in criteria expression. On the other side, any one of the following queries works fine: SELECT * FROM Flats WHERE Flats.VersionStamp <= [theDate] AND Flats.Flat=1 SELECT * FROM Flats WHERE Flats.VersionStamp <= #1/1/2009# AND Flats.Flat=[theFlat] The C# code stays the same all the

Exception: No value given for one or more required parameters in VB.NET & MS-ACCESS DB

我与影子孤独终老i 提交于 2019-12-25 04:24:52
问题 I work with an Inventory System. I have an error on my code, it says No value given for one or more required parameters. and the error was thrown to cmd.ExecuteNonQuery() . What does it mean? can someone help me? By the way this code is for deducting Item Quantity on Database. Sorry for my bad English. con.Open() Dim sqlQry As String = "UPDATE [tbl_Stocks] SET [Quantity] = [Quantity] - @QU WHERE Products='" & lbPro.Text & "'" Using cmd As New OleDbCommand(sqlQry, con) cmd.Parameters

Connecting Supertype / Subtype?

泪湿孤枕 提交于 2019-12-25 04:15:51
问题 I have to connect Supertype Entity Called Users ( User_ID (PK) , User_Password , Registration_Date , .. etc ) . to Each one of the following entities : Employees ( Employee_ID (PK) , Fname , Lname , Birthdate .. etc ) Customers ( Customers_ID (PK) , Fname , Lname , Birthdate .. etc ) Suppliers( Supplier_ID (PK) , Fname , Lname , Birthdate .. etc ) .. How To Do It ( For relational database ) Using Ms-Access ? 回答1: There are generally 3 strategies for representing inheritance in the relational

Export MSSQL database to MS Access .accdb file

倾然丶 夕夏残阳落幕 提交于 2019-12-25 04:13:44
问题 I have a Microsoft SQL Server database which is updated with data regularly. I would like to store this database with all tables (and preferrably relationsships) to a new Microsoft Access (.accdb) file using C#. SQL Management Studio is installed on the system so I think one solution could be to invoke BCP (http://msdn.microsoft.com/en-us/library/ms162802.aspx) from the code, but I haven't figured out how to use it correctly in this case. I guess there are much better ways doing it without

SQL - Join Expression Not Supported

懵懂的女人 提交于 2019-12-25 04:11:18
问题 I am new using Access and trying to change this query: SELECT DateDiff("d", [Invoice]![TxnDate],[ReceivePaymentLine]![TxnDate]) AS ActualPaymentDays, IIF ([ActualPaymentDays] < 90, 0.10, IIF ([ActualPaymentDays] < 120, 0.09, IID ([ActualPaymentDays] , 365, 0.05, 0))) AS PayPerValue FROM ReceivePaymentLine INNER JOIN Invoice ON ReceivePaymentLine.AppliedToTxnTxnID = Invoice.TxnID I make "ActualPaymentDaysRate" table: ActualPaymentDay1 PayPerValue1 ActualPaymentDay2 PayPerValue2

Check if value has changed when moving data

老子叫甜甜 提交于 2019-12-25 04:09:06
问题 I have built a macro already that moves values inside about 10 different tables from one database to another. It takes a unique identifier so say columns "nid" and checks to see if it already exists in the new database, if there is no match it moves the data if there is a match and it already exists it doesn't. This macro is working fine however, I would like it to check if the value already exists and if it does to check each column for any changes and if there are changes to the value's to

INSERT INTO giving error in Ucanaccess

微笑、不失礼 提交于 2019-12-25 04:08:26
问题 I am trying to insert a row into a table (userGames), using Ucanaccess, and, when executing the statement, am recieving the following error: Feb 10, 2015 8:29:02 PM db.Connect update SEVERE: null net.ucanaccess.jdbc.UcanaccessSQLException: unknown token: at net.ucanaccess.jdbc.UcanaccessStatement.execute(UcanaccessStatement.java:145) at db.Connect.update(Connect.java:42) at db.GameScanner.searchGames(GameScanner.java:99) at db.GameScanner.<init>(GameScanner.java:91) at db.WelcomeGUI

INSERT INTO giving error in Ucanaccess

烂漫一生 提交于 2019-12-25 04:08:11
问题 I am trying to insert a row into a table (userGames), using Ucanaccess, and, when executing the statement, am recieving the following error: Feb 10, 2015 8:29:02 PM db.Connect update SEVERE: null net.ucanaccess.jdbc.UcanaccessSQLException: unknown token: at net.ucanaccess.jdbc.UcanaccessStatement.execute(UcanaccessStatement.java:145) at db.Connect.update(Connect.java:42) at db.GameScanner.searchGames(GameScanner.java:99) at db.GameScanner.<init>(GameScanner.java:91) at db.WelcomeGUI

How to secure a network folder containing an Access database, while still allowing a WinForms application to connect to the database

会有一股神秘感。 提交于 2019-12-25 03:53:57
问题 I am taken over support on a VB.Net WinForms application and the company that I am doing the support for has lost the source code for the application. I have the installation CD for the application and the installation steps for a network install are: Copy the access database for the application to a location on the server. Create a share on the folder that contains the database and give Everyone full access. Install the application on the client desktops via a ClickOnce installation. The