odbc

Does MS Access support “CASE WHEN” clause if connect with ODBC?

孤街浪徒 提交于 2019-11-26 08:56:57
问题 Does ODBC support CASE WHEN clause for MS Access? Is there any other database which does not support the CASE WHEN clause? I tried the following query while connecting to MS Access with ODBC but get an exception. SELECT (CASE WHEN (AGE > 10) THEN 1 ELSE 0 END) FROM demo [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression \'(CASE WHEN (AGE > 10) THEN 1 ELSE 0 END)\' I\'m try to find a common way which works for most of the database to generate (compute

Excel: Use a cell value as a parameter for a SQL query

て烟熏妆下的殇ゞ 提交于 2019-11-26 08:06:09
问题 I\'m using MS Excel to get data from a MySQL database through ODBC. I successfully get data using an SQL query. But now I want that query to be parameterized. So I wonder If it is possible to use a cell value (a spreadsheet cell) as a parameter for such a query. For example, for this query: select name from user where id=1 I\'d like to get the id value from, say, cell D4 in the spreadsheet. Is that the proper approach to parameterize a query? and how can I do it? Thanks. 回答1: I had the same

Hand Install of 64-bit MS Access ODBC drivers when 32-bit Office is present

拜拜、爱过 提交于 2019-11-26 07:38:54
问题 I want to do a hand install of the MS Access 64 bit odbc drivers. Uninstalling 32 bit Office and installing 64 bit Office is not an option due to the add-ins that our company uses. I downloaded the AccessDatabaseEngine_x64.exe and using WinRar and Universal Extractor have managed to unpack all the files into a temp directory. I believe I have all of the files necessary but am a bit unsure where to go from here and would appreciate a little guidance. Which DLLs need to be registered to make

Unable to retrieve UTF-8 accented characters from Access via PDO_ODBC

南笙酒味 提交于 2019-11-26 06:47:42
问题 I am trying to get an Access DB converted into MySQL. Everything works perfectly, expect for one big monkey wrench... If the access db has any non standard characters, it wont work. My query will tell me: Incorrect string value: \'\\xE9d\' If I directly echo out the rows text that has the \'invalid\' character I get a question mark in a black square in my browser (so é would turn into that invalid symbal on echo). NOTE: That same from will accept, save and display the \"é\" fine in a textbox

“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

what is the difference between OLE DB and ODBC data sources?

前提是你 提交于 2019-11-26 04:29:49
问题 I was reading a MS Excel help article about pivotcache and wonder what they mean by OLE DB and ODBC sources ...You should use the CommandText property instead of the SQL property, which now exists primarily for compatibility with earlier versions of Microsoft Excel. If you use both properties, the CommandText property’s value takes precedence. For OLE DB sources , the CommandType property describes the value of the CommandText property. For ODBC sources , the CommandText property functions

How to bind parameters via ODBC C#?

依然范特西╮ 提交于 2019-11-26 04:27:33
问题 I need to bind parameters on ODBC query from C#. This is the sample code, but VS tells me that there\'s one parameter missing. OdbcCommand cmd = conn.CreateCommand(); cmd.CommandText = \"SELECT * FROM user WHERE id = @id\"; cmd.Parameters.Add(\"@id\", OdbcType.Int).Value = 4; OdbcDataReader reader = cmd.ExecuteReader(); What is the syntax for binding values on ODBC? 回答1: Odbc cannot use named parameters. This means that the command string uses placeholders for every parameter and this

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

守給你的承諾、 提交于 2019-11-26 03:58:53
问题 I am trying to open a program for the first time on Windows XP Pro that uses PostgreSQL 9. I\'m getting an error message that says : A problem was encountered while trying to log into or create the production database. Details: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified In my ODBC manager, I have a list of User DSN\'s and System DSN\'s. I tried installing a postgres odbc driver to see if that would help, but it didn\'t. There is a connect.dat

Connect PHP to MSSQL via PDO ODBC

人走茶凉 提交于 2019-11-26 03:10:32
问题 When I execute this code: print_r(PDO::getAvailableDrivers()); It says I have the odbc driver available. Array ( [0] => mysql [1] => odbc [2] => sqlite ) However, when I try to use it like so: $handle = new PDO(\"odbc:Server=dbServerIpAddress,myportnumber;Database=mydatabase\", \"myusername\", \'mypassword\'); It doesn\'t do anything - no errors and it doesn\'t work at all. It won\'t even execute past that line! How can I connect PHP to this MSSQL database via PDO and ODBC? 回答1: There are

Working with an Access database in Python on non-Windows platform (Linux or Mac)

独自空忆成欢 提交于 2019-11-26 00:56:08
问题 I want to access the data in a Microsoft Access database. I have some .accdb and .mdb files and want to read them in Python. From my research, pyodbc can only be used on Windows platform, but I am working on Mac OS X. I am new to Python. The other option is if I could export the data from the database to a csv and then use in python. Any help or starting would be highly appreciated. 回答1: "From my research, pyodbc can only be used on Windows platform" Not true. The main pyodbc page says