ms-access

What character sanitation do I need for an MS Access Pass Through Query to SQL Server

隐身守侯 提交于 2019-12-31 05:20:06
问题 I am attempting to interface MS Access with SQL Server and I want to make sure I am not vulnerable to SQL Injection attacks. I have seen suggestions to use ADO to create a paramaterized version of the queries, but I wanted to learn how to sanitize my input with a DAO pass through. At the moment I am escaping single quotations and backslashes. Are there any standard SQL Server injection sanitation methods in VBA? 回答1: Are there any standard SQL Server injection sanitation methods in VBA? Nope.

Access SQL: syntax error(missing operator)

给你一囗甜甜゛ 提交于 2019-12-31 05:19:14
问题 My task is: Choose all profitable flights . transportation is a general information about the flight. ticket includes information about a number of tickets and their cost. So I tried to update column profit after that find the most profitable but I gained such an error syntax error(missing operator)in query expression'((tt.cost*(tt.sold_q+tt.booked_q))-(0,2* trans.plan_oil)) FROM transportation trans' UPDATE transportation set profit =((tt.cost*(tt.sold_q+tt.booked_q))-(0,2* trans.plan_oil))

Create table with COUNT ms-access

自闭症网瘾萝莉.ら 提交于 2019-12-31 05:13:09
问题 I have a database and I want to create a table with COUNT function in it. Is it possible ? I have 3 existing tables: Member Feedback Attendance In Feedback table, 2 columns Class_ID, Likes (Class_ID link with the attendance, as each member attend 1 class eg. class 1,2,3,etc. and Likes is for the number of people like the class). In Attendance table, 3 columns: Class_ID Member_ID Non_member_name Now I want to alter Feedback table to add 2 new columns. One to count the number of people attend

How to get windows username in MS Access VBA on Windows Server 2008

穿精又带淫゛_ 提交于 2019-12-31 05:13:06
问题 I am using this code in my MS Access VBA: How to get logged-in user's name in Access vba? It works perfectly fine. However, our foreign employees need to use the software on a server, and it is unable to retrieve the username. We are signed in as usual. The server version is Windows Server 2008 SP2. Any suggestions? Best regards, Emil. 回答1: I don't know which method you are using (there are several answers), but this one suggested by HansUp is easy and hopefully works on the Server too: https

Access 2007 doesn't import all element data from XML file

霸气de小男生 提交于 2019-12-31 05:10:26
问题 I have this XML data I need to import into Access for further processing. I copied here only small part of the data: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="Access Question.xsl"?> <Catalogue> <App action="A" id="308"> <BaseVehicle id="67"/> <!-- 1983 Porsche 911 --> <BodyType id="9"/> <!-- Coupe --> <EngineBase id="15"/> <!-- H6 3.0L --> <Note>OE sensor technology</Note> <Qty>1</Qty> <PartType id="5132"/> <!-- Oxygen Sensor --> <MfrLabel>Sensor<

Extract VBA-Code from Access via C#

岁酱吖の 提交于 2019-12-31 05:10:11
问题 How do I extract all VBA Code (Forms, Moduls, Reports) out of more than hundred Access databases via c#. It is not possible to change the databases an/or add vba code to them. The extraction of the Code has to be done read-only. I tried this Code: var appClass = new ApplicationClass(); appClass.OpenCurrentDatabase(@"C:\Temp\Test\FBIOE.mdb", false, ""); Console.WriteLine(appClass.Version); Console.WriteLine(appClass.Modules.Count.ToString()); Console.WriteLine(appClass.Modules.Parent.ToString(

How to implement transaction way in vb.net?

北战南征 提交于 2019-12-31 05:08:51
问题 I develop one application using VB.net (200%) that connects to MS-Access Database, I use TableAdapter and Dataset for connection to the Access DB file. I need to implement a simple transaction method (commit, rollback) in saving to the DB? Is there a way to do that without the need to use inline SQL statement? Thanks, 回答1: As I read Microsoft Jet (Access DB Engine) supports transactions. So you can create a transaction like this (example from CodeProject): SqlConnection db = new SqlConnection

How to implement transaction way in vb.net?

巧了我就是萌 提交于 2019-12-31 05:08:05
问题 I develop one application using VB.net (200%) that connects to MS-Access Database, I use TableAdapter and Dataset for connection to the Access DB file. I need to implement a simple transaction method (commit, rollback) in saving to the DB? Is there a way to do that without the need to use inline SQL statement? Thanks, 回答1: As I read Microsoft Jet (Access DB Engine) supports transactions. So you can create a transaction like this (example from CodeProject): SqlConnection db = new SqlConnection

Connect to MS Access in Python

时光怂恿深爱的人放手 提交于 2019-12-31 04:50:31
问题 I tried a lot of examples from internet to include a MS Access connection to my python project without sucess I have my python project in Eclipse with Anaconda, and my code is: import win32com.client import pyodbc def ado(): ''' connect with com dispatch objs ''' conn = win32com.client.Dispatch(r'ADODB.Connection') DSN = ('PROVIDER = Microsoft.Jet.OLEDB.4.0;DATA SOURCE = ' + db + ';') conn.Open(DSN) rs = win32com.client.Dispatch(r'ADODB.Recordset') strsql = "select * from Empresas" rs.Open

SQL - Check if data exists on either table

北战南征 提交于 2019-12-31 04:35:28
问题 I have two tables in my database regarding the login details for both of my users (Librarians and Students) I have separated the user's details into 2 separate tables tblUserLibrarian and tblUserStudent; one for the Librarians and one for the Students. The Primary key in each table is the username or ID (LibrarianID and StudentID). Outline of the tables are like this: tblUserStudent StudentID Password FirstName LastName S1201235 pass3 Jane Smith S1201289 pass5 Pass Word S1202009 pass2 John