ms-access

OleDB Parameters

戏子无情 提交于 2020-01-11 11:51:31
问题 I have this access db that I have a ddl for the state name and a ddl for the year. I have a gridview that I'd like to pass the value of the state drop down list into where clause. Obviously if I could use sql with the named parameters I would but this is what I'm stuck with and not sure exactly how to format it correctly. the drop down list is name ddlStates. In the parameters I've tried mycommand.Parameters.Add("@ddlStates") here is the data set public DataSet GetData() { DataSet ds; using

Converting MySQL to MS Access

余生颓废 提交于 2020-01-11 10:52:33
问题 I have a table in MySQL with a large amount of data that I would really rather not manually copy accross to MS Access. In simple terms how would I convert the Table from MySQL to the MS Access. Thanks in advance! S 回答1: One option is to use ODBC. Use Access to pull in the data from MySQL. Install the MySQL ODBC driver. Create a system DSN for the MySQL database. Create a new Access database. Find the approprate Access menu command for importing external data. This will depend on your version

Converting MySQL to MS Access

耗尽温柔 提交于 2020-01-11 10:52:25
问题 I have a table in MySQL with a large amount of data that I would really rather not manually copy accross to MS Access. In simple terms how would I convert the Table from MySQL to the MS Access. Thanks in advance! S 回答1: One option is to use ODBC. Use Access to pull in the data from MySQL. Install the MySQL ODBC driver. Create a system DSN for the MySQL database. Create a new Access database. Find the approprate Access menu command for importing external data. This will depend on your version

Converting MySQL to MS Access

空扰寡人 提交于 2020-01-11 10:52:25
问题 I have a table in MySQL with a large amount of data that I would really rather not manually copy accross to MS Access. In simple terms how would I convert the Table from MySQL to the MS Access. Thanks in advance! S 回答1: One option is to use ODBC. Use Access to pull in the data from MySQL. Install the MySQL ODBC driver. Create a system DSN for the MySQL database. Create a new Access database. Find the approprate Access menu command for importing external data. This will depend on your version

unixODBC PHP Update statement error

▼魔方 西西 提交于 2020-01-11 10:33:24
问题 I'm using Ubuntu+php+unixodbc+mdbtools for working with .mdb file. Every thing(connection+select) works good, but Insert or Update statements. My code is something like this : $mdbConnection = new \PDO("odbc:mdbdriver",$user , $password , array('dbname' =>$FileName) ); $SelectResult = $mdbConnection->query("Select * from Zone"); $UpdateResult = $mdbConnection->query("Update Zone Set ShahrCode = 99"); $SelectResult returns correct result, but the second one throws an error that cause apache to

unixODBC PHP Update statement error

爷,独闯天下 提交于 2020-01-11 10:32:04
问题 I'm using Ubuntu+php+unixodbc+mdbtools for working with .mdb file. Every thing(connection+select) works good, but Insert or Update statements. My code is something like this : $mdbConnection = new \PDO("odbc:mdbdriver",$user , $password , array('dbname' =>$FileName) ); $SelectResult = $mdbConnection->query("Select * from Zone"); $UpdateResult = $mdbConnection->query("Update Zone Set ShahrCode = 99"); $SelectResult returns correct result, but the second one throws an error that cause apache to

access-SQL pass-through query (creating SP) error

谁说胖子不能爱 提交于 2020-01-11 10:18:14
问题 I am trying to create a stored procedure using pass-through query in SQL Server 2012, using MS Access 2010. IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'SCHtest') EXECUTE sp_executesql N'create schema SCHtest' GO CREATE PROCEDURE [SCHtest].[SQLLrtest_2] AS BEGIN INSERT INTO [dbo].[UploadTest] (.....) In Access I get this error: Run time error '3146': [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax nera 'GO'. (#102) [Microsoft][ODBC SQL Server Driver][SQL Server]

Equivalent of SET IDENTITY_INSERT OFF in Access

和自甴很熟 提交于 2020-01-11 09:45:11
问题 As the title suggests, is there any way of turning off an autonumber field in Access to allow me to insert a row with an id of my choosing, such as you would do with SET IDENTITY_INSERT OFF in SQL Server? 回答1: You can insert an ID with SQL. INSERT INTO Table1 (ID) Values (-10) 回答2: The autonumber property sets a field's default value as the autonumber seed value. If the autonumber field is also the primary key (or has a separate unique constraint), you can't re-use any of the stored values.

Aggregate SQL query grouping by month

时光总嘲笑我的痴心妄想 提交于 2020-01-11 09:38:07
问题 I have a database of Transactions (Access 2007) that are recorded in hourly, daily and monthly intervals. I would like to view them in a meaningful way (instead of hour-by-hour energy usage, which is how it's stored, I want all usage for the month of January, 2011). The tables that I want to operate on have this general format: CustID|CustomerCode|TransactionDate|(Transaction Hour depending on table)|Usage So If I want to take a table like that and make a view that looked something like this

Syntax Error with Query

时间秒杀一切 提交于 2020-01-11 09:21:31
问题 I would like to use an Insert Into query in Delphi XE2 to insert a user's information into a MS Access Database. The problem is I keep getting the same error: Syntax error in INSERT INTO statement I have done some research but there is no definitive answer. my source code is: opendb('QuizDB.mdb'); DB.Close; DB.SQL.Add('INSERT INTO tblUsers'); DB.SQL.Add('(FirstName,Surname,Username,Password,Grade)'); DB.SQL.Add('Values (:Firstname, :Surname, :Username, :Password, :Grade)'); Db.Parameters