odbc

Keeping UID and PWD out of an ADO connection string in an ODBC DSN-less Database and a DAO cached connection?

☆樱花仙子☆ 提交于 2019-12-02 08:33:22
I have used Ben Clothier's suggestion from his Office Blog Power Tip ( http://blogs.office.com/2011/04/08/power-tip-improve-the-security-of-database-connections/ ) to create a DSN-less connection with cached credentials so that users' UID and PWD aren't saved, or required multiple times, when working in the Access interface. Have others done this? If so, what has been your approach when you need to use an ADO connection instead of DOA to reach SQL from Access via VBA? How do you open a adodb connection without having to provide the User ID and Password again, or having to put it in the code?

Order Oracle query by SUM without selecting the SUM

限于喜欢 提交于 2019-12-02 08:16:03
问题 I have a table somewhat like the following one: lot | defect | quantity -------+----------+----------- lot1 | c | 7 lot1 | c | 2 lot3 | e | 5 lot3 | b | 9 lot3 | a | 5 lot2 | d | 4 lot4 | c | 12 ... | ... | ... I want to sum the quantities where the lot and defect are equal between rows and then order the lot by the sum of its quantity (lot3=9+5+5=19, lot4=12, lot1=7+2=9, lot2=4), then the quantity (inside each lot), and then the defect. So it should result in the following: lot | defect |

How to parameterise table name in ODBC query

Deadly 提交于 2019-12-02 08:10:44
问题 I have an ODBC connection to a database and I would like the user to be able to view data within any table. As this is an ASP.net application I cannot trust that the table name sent doesn't also contain nasties. I have tried using a parameterised query but I always get an error saying that I " Must declare the table variable " - this appears to be an issue because it is the table name string sql = "SELECT TOP 10 * FROM ? "; OdbcCommand command = new OdbcCommand(sql, dbConnection); command

ODBC .DBF Files in C#

时光怂恿深爱的人放手 提交于 2019-12-02 08:07:00
I am having a lot of trouble using .dbf files. I have an application written in C# that reads from .DBF files and then exports them to another database. I've tried using the Microsoft dBase driver but it's not reading all of the .DBF files that I need to, meaning that I can retrieve data from only two of the five .DBF files, Visual Studio is telling me the other .DBF files don't exist and it keeps saying the my input string is too large. There are some Microsoft Visual Fox Pro drivers but every time I choose one of those, Visual Studio is telling me that it couldn't make a connection. The

How to import an Excel file into MySQL using ODBC in Java?

蓝咒 提交于 2019-12-02 07:36:59
I want to import an Excel file into a MySQL database using an ODBC driver. Does Java support this technique? If yes, please guide me on how to implement this. You can read an Excel file in Java using the Apache POI library: http://poi.apache.org/ There are some code samples on their howto page which will tell you how to read an Excel file: http://poi.apache.org/spreadsheet/how-to.html To store the data it would be better for you to use the JDBC driver for MySQL rather than ODBC since ODBC relies on native libraries. You can get the connector here: http://www.mysql.com/products/connector/ If

is there a 64-bit msdasql for windows 7?

♀尐吖头ヾ 提交于 2019-12-02 07:17:24
问题 I am using Windows 7 (x64bit) Ultimate. I have both ODBC32 and ODBC64 Managers that I can access via Start. The default appears to be the ODBC64. However I do not see MSDASQL -Microsoft OLEDB for ODBC listed. I wonder if it exists. I see some references to 64Bit MSDASQL for Windows Server 2003. The IBM 64bit for ODBC seems to work (I heard) but not tried. Now I would like to know if any one knows the link for 64-bit MSDASQL for Windows 7. Microsoft seems to have deprecated MSDASQL and I am

Dapper WHERE IN statement with ODBC

心已入冬 提交于 2019-12-02 07:11:32
问题 I am using Dapper on ODBC provider, which as known does not support named parameters. For most of my queries I used pseudo named parameters: ?name? . However, when I try to string query = $"select * from \"{TableName}\" where ID in ?Ids?"; return connection.Query<CdfGroupByCdfUserRecord>(query, new {Ids = ids}).ToArray(); I see that Dapper generates query select * from "MY_TABLE" where ID in (?Ids1,?Ids2,?Ids3,?Ids4,?Ids5)? What should I do to get it work? 回答1: This appears to be a bug in

Dapper WHERE IN statement with ODBC

流过昼夜 提交于 2019-12-02 06:59:48
I am using Dapper on ODBC provider, which as known does not support named parameters. For most of my queries I used pseudo named parameters: ?name? . However, when I try to string query = $"select * from \"{TableName}\" where ID in ?Ids?"; return connection.Query<CdfGroupByCdfUserRecord>(query, new {Ids = ids}).ToArray(); I see that Dapper generates query select * from "MY_TABLE" where ID in (?Ids1,?Ids2,?Ids3,?Ids4,?Ids5)? What should I do to get it work? This appears to be a bug in dapper. I'll try to fix it for 1.50.2. I've logged it (for tracking purposes) here 来源: https://stackoverflow

How to parameterise table name in ODBC query

让人想犯罪 __ 提交于 2019-12-02 06:24:27
I have an ODBC connection to a database and I would like the user to be able to view data within any table. As this is an ASP.net application I cannot trust that the table name sent doesn't also contain nasties. I have tried using a parameterised query but I always get an error saying that I " Must declare the table variable " - this appears to be an issue because it is the table name string sql = "SELECT TOP 10 * FROM ? "; OdbcCommand command = new OdbcCommand(sql, dbConnection); command.Parameters.Add(new OdbcParameter("@table", tableName)); OdbcDataAdapter adapter = new OdbcDataAdapter();

Illegal attempt to use Text/Byte host variable - Inserting into TEXT column

Deadly 提交于 2019-12-02 05:29:51
Trying to insert into a table (Text Column) via Dapper, and getting the error from Informix: Illegal attempt to use Text/Byte host variable I have written a small program to simulate this, and I am still up against problems. We cannot currently use the Informix drivers, as they do not suit our needs. using Dapper; using System; using System.Data.Odbc; namespace DapperParamsTest { class Program { static void Main(string[] args) { OdbcConnection conn = new System.Data.Odbc.OdbcConnection("Driver={IBM INFORMIX ODBC DRIVER (64-bit)}; Host=bylgia; Server=bylgia; Service=sqlexec; Protocol=onsoctcp;