ms-access-2013

TRANSFORM and PIVOT in Access 2013 SQL

落爺英雄遲暮 提交于 2019-11-27 04:40:49
How can I get second table from first table using TRANSFORM and PIVOT functions: TABLE_01 Config_ID | ConfigField | ConfigValue ----------------------------------------- 11 | Name | Basic 11 | Version | 1.01 11 | Owner | Jack 12 | Name | Advanced 12 | Version | 1.03 12 | Owner | Andy TABLE_02 Config_ID | Name | Version | Owner -------------------------------------------- 11 | Basic | 1.01 | Jack 12 | Advanced | 1.03 | Andy I'm trying this: TRANSFORM ConfigValue SELECT Config_ID FROM TABLE_01 GROUP BY Config_ID PIVOT ConfigField but got an error: "Your query does not include the specified

Cannot edit or re-save an existing event-driven Data Macro in Access 2010

耗尽温柔 提交于 2019-11-26 23:41:59
问题 (This is a follow-up to an answer from an earlier question here.) I have an Access 2010 database file containing a table with a Before Change Data Macro: I can open the table in Datasheet View and add rows, and the Data Macro behaves as expected. However, if I open the table in Design View, open the Data Macro for editing, do something trivial like click the [+] beside one of the macro steps to expand the details, and then try to save the "changes" I get the error The 'LookUpRecord' macro

Storing an image into an Attachment field in an Access database

主宰稳场 提交于 2019-11-26 17:58:30
I'm writing a VB application where I need to store an image in the database. The user selects the image on their computer, which gives me the path as a string. Here's my attempt at it, however I'm getting the error "An INSERT INTO query cannot contain a multi-valued field." Here is my code: Dim buff As Byte() = Nothing Public Function ReadByteArrayFromFile(ByVal fileName As String) As Byte() Dim fs As New FileStream(fileName, FileMode.Open, FileAccess.Read) Dim br As New BinaryReader(fs) Dim numBytes As Long = New FileInfo(fileName).Length buff = br.ReadBytes(CInt(numBytes)) Return buff End

“General error Unable to open registry key Temporary (volatile) …” from Access ODBC

冷暖自知 提交于 2019-11-26 16:45:40
I tried the following: private String password = ""; private String dbName = "dataHC.accdb"; private String bd = dbName + ";PWD=" + password; String url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ="+bd+";"; private Connection conn = null; //Connect public void connect() { try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); conn = DriverManager.getConnection(url); if (conn != null) System.out.println("Conexión a base de datos "+dbName+". listo"); }catch(SQLException e){ System.out.println(e); }catch(ClassNotFoundException e){ System.out.println(e); } } Font: http://www.jc

“General error Unable to open registry key Temporary (volatile) …” from Access ODBC

馋奶兔 提交于 2019-11-26 04:55:47
问题 I tried the following: private String password = \"\"; private String dbName = \"dataHC.accdb\"; private String bd = dbName + \";PWD=\" + password; String url = \"jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=\"+bd+\";\"; private Connection conn = null; //Connect public void connect() { try{ Class.forName(\"sun.jdbc.odbc.JdbcOdbcDriver\"); conn = DriverManager.getConnection(url); if (conn != null) System.out.println(\"Conexión a base de datos \"+dbName+\". listo\"); }catch