ms-access

Copy table from one database to another in Windows Forms using C# and MS Access Oledb

余生长醉 提交于 2019-12-24 16:19:49
问题 How to copy a table from one database to another , I'm developing a windows app using c# in .NET.The copying has to be done by the app. Extract data into an empty table in database 2 from a filled table in database1.I'm using access db , Oledbconnection. I found some answers for sql server though , but not really helping. 回答1: You can refer to the second DB in SQL and execute against a connection to the first mdb/accdb: Connection using System.Data.OleDb; <...> string ConnString = @"Provider

Why can't we put all masters in one Master table in Database?

泪湿孤枕 提交于 2019-12-24 16:09:45
问题 We are designing a small database in MS Access 2010 and we have like 3 master attributes Lets take for example we have Country, State and Tastes. Instead of designing master table for each attribute, we have come up with one table like below ID Value Attribute 1 USA Country 2 UK Country 3 Illionis State 4 Wisconsin State 5 Sweet Taste 6 Sour Taste We are using self joins and getting what is required. Does anyone think that, it is not a good database design, if yes please explain 回答1: Reasons

access query needed

你说的曾经没有我的故事 提交于 2019-12-24 16:09:39
问题 I am looking for an access query, but a sql server 2008 could be sufficient as I can use a passthrough feature in access. My data looks like this . -------------------------------------------------------------- id nameid name score diff include -------------------------------------------------------------- 1 0001 SO 100 0 0 2 0001 SO 100 0 0 3 0001 SO 100 0 0 4 0001 SO 100 0 0 5 0001 SO 100 0 0 6 0001 SO 100 0 0 7 0002 MO 10 0 0 8 0002 MO 18 0 1 9 0002 MO 20 0 0 10 0002 MO 14 0 0 11 0002 MO

how to combine 2 different table?

不打扰是莪最后的温柔 提交于 2019-12-24 15:41:18
问题 how to combine 2 different tables where they contain the same fields but different data, example Cash_Expenses { exp_date exp_cat_id exp_amount exp_remark } Cheque_Espenses { exp_date exp_cat_id exp_cheque_NO exp_amount exp_remark } exp_cat { cat_id Cat_name } now what i am trying to do is that i want to combine those three and sum the amount to its respective cat, where when i use this sql statment SELECT DISTINCT exp_cat.cat_name, Sum(exp_cash.exp_amount) AS SumOfexp_amount, Sum(exp_cheque

MS access add item to combo box if non in list

半腔热情 提交于 2019-12-24 15:39:38
问题 I have an access form, i want to know how to add item in combo box if there is not in there. my combo box is in value mode. 回答1: Unfortunately you cannot change the rowsource permanently without changing the form to design mode and adding the new value. It is possible to do this with code, but it is not a good idea when people are working. The easiest thing is to create a small table and add the values to that. New values will then be saved when you close the form. Allen Browne has a

exporting a query output to a text file

霸气de小男生 提交于 2019-12-24 15:33:26
问题 I have an access query which I am trying to export to a text file using the following code: DoCmd.TransferText acExportFixed, "Export Specification", _ "Test Query", "C:\Users\Documents\TestOutput.txt", True The issue I am having is: The output file "TestOutput.txt" has the data displayed with fixed width but the column headers are comma delimited. I want the column headers to be fixed width too. What would column headers not be displayed same as the rest of the data? 回答1: AFAICT, that is an

MS Access Passthrough Query Update

和自甴很熟 提交于 2019-12-24 15:27:33
问题 I am trying to make an Update to a Passthrough query using MS Access to an ODBC server that I have no control over. The reason I have to use a Passthrough is that the records I am accessing have more than 255 fields (I would use a linked table if I could). I've been using this resource to get the data using Passthrough (http://www.techonthenet.com/access/tutorials/passthrough/basics09.php) The query is simply: SELECT FullName, PointNumber FROM DNP3.CDNP3AnalogIn The ODBC Connect Str is: ODBC

Access 2013 accde file can't export to acFormatXLSX

大兔子大兔子 提交于 2019-12-24 15:24:06
问题 I have an Access 2013 database and I saved it as an accde file to give to the end users. I noticed that the Report Print Preview no longer had the export buttons on the ribbons. I am not sure why they are there in the accdb but gone in the accde file and could not find anything using Google to explain this but I did find a lot of articles saying you had to make your own ribbon for the runtime version of Access to export to Excel. I am not using the runtime but I made my own ribbon and it

Can't filter MS access datetime field using short date

不想你离开。 提交于 2019-12-24 15:23:05
问题 I am trying to generate a crystal report for my program, apparently I wasn't able to filter those data which is in datetime format if i use "=" and not "> or <". my code goes something like this dim x as string ="1/1/2014" dim y as date y=cdate(x) select from [tblname] WHERE [datetime field]=#" & y &"# the query won't yield any record assuming there is more than one record with 1/1/2014 date not unless i copy the actual datetime data stored in access or use the "> or <" is there any way that

SQL Scheduling - Overbooked Report

懵懂的女人 提交于 2019-12-24 15:12:06
问题 I need a way to view a given resource (in this case rooms/beds) that are overbooked. Here's my table structure. Sorry about the Hungarian notation: tblRoom --RoomID tblBooking --BookingID --BeginDate --EndDate --AssignedRoomID (foreign key) I don't have any non-working SQL to post here because I really don't know where to start. I'm using MS Access but I'm looking for a database agnostic solution if possible. It's OK to have to have to change some of the keywords to match the dialect of a