dsn

SQLGetPrivateProfileString failed with

旧时模样 提交于 2019-12-01 17:29:22
问题 Typing the command: odbcinst -q -s on RHEL 6, I get the following error message: odbcinst: SQLGetPrivateProfileString failed with . All my DSN's are also not showing up when I run: odbcinst -q -d 回答1: Type the command: env |grep 'ODBC' to check if the ODBCSYSINI and the ODBCINI variables are set. If no results are returned - you need to add the variables to the environment variable pointing to the directory and the path to where the odbc.ini file is located as follows (in my case for RHEL 6

SQLGetPrivateProfileString failed with

浪子不回头ぞ 提交于 2019-12-01 17:19:19
Typing the command: odbcinst -q -s on RHEL 6, I get the following error message: odbcinst: SQLGetPrivateProfileString failed with . All my DSN's are also not showing up when I run: odbcinst -q -d Type the command: env |grep 'ODBC' to check if the ODBCSYSINI and the ODBCINI variables are set. If no results are returned - you need to add the variables to the environment variable pointing to the directory and the path to where the odbc.ini file is located as follows (in my case for RHEL 6 it is located at /etc - others may have it on /usr/local/etc ): Edit ~\.bash_profile and add the following

What is the simplest, most maintainable way to create a SQL Server ODBC Data Source?

邮差的信 提交于 2019-11-30 18:18:31
问题 I need a programmatic way of creating a SQL Server ODBC Data Source. I can do this by directly accessing the Registry. It would be better if this could be done via an available (SQL Server/Windows) API to protect against changes in the registry keys or values with updated SQL Server drivers. Accepted Answer Note: Using SQLConfigDataSource abstracts the code from the details of Registry keys etc. so this is more robust. I was hoping, however, that SQL Server would have wrapped this with a

Differences Between Drivers for ODBC Drivers

十年热恋 提交于 2019-11-28 16:48:15
问题 I was setting up the System DSN (64 bit) for my database in SQL server 2016 with Windows 10 64 bit pro. While I was asked to choose the driver to set up a data source, there are the following selections: ODBC Driver 13 for SQL Server SQL Server SQL Server Native Client 11.0 SQL Server Native Client RDA 11.0 It seemed I can set up the data source with all of these drivers. Then which one should I choose in terms of speed and efficiency? What's the difference between them? Thanks, Jason 回答1:

Report asking for database login on setting DataTable as DataSource

跟風遠走 提交于 2019-11-28 14:46:00
Report designer creates crystal report in designer with direct connection to database with ODBC (DSN) connection. Same reports are executed via a Winform(C#) application via DSN and provides Database Server, database, user ID and password. I need to make such changes to the Crystal Report object. ReportDocument should not directly connect to Database via DSN. Instead, we will bring data via service by calling respective stored procedure and parameters as System.Data.DataTable . This DataTable object should be used to populate/generate reports. I do get the stored procedure and parameter

Creating a DSN-less connection for MS Access within Java

做~自己de王妃 提交于 2019-11-28 08:46:15
I'm building a desktop app that needs to communicate with a MS Access database. Now, unless I want to register the DSN for the database on every computer that's going to use the desktop app, I need a way to connect to the database in a DSN-less fashion. I've searched alot and found some useful links on how to create connection strings and based on that I tried modifying my program based on that but without success. The code below fails. If i switch the string in the getConnection to "jdbc:odbc:sampleDB" it works, but that's using DSN and not what I want to achieve. How do I write and use a

How to programmatically create an ODBC Linked Table to a SQL Server View and have it be editable?

故事扮演 提交于 2019-11-28 00:26:29
When I create a DSN connection to SQL Server using the wizard, I am able to link it to a view. In this case, Access recognizes it as an editable table. But if I use a DSN-less connection to a view using vba code (Method 1 from https://support.microsoft.com/en-us/kb/892490 ), it is linked as a table that is NOT updatable. I don't know why there is a difference, but how can I make a connection to a view in SQL Server (either as a table or a query in Access) and have it be updatable? Edit: When I make a DSN-less connection using a table in SQL Server rather than a view, it is updatable in Access.

PDO returning error “could not find driver” with a known working DSN

佐手、 提交于 2019-11-27 14:45:14
I'm trying to connect to an odbc database via php's PDO class: $dsn = 'odbc:CS_HDZipCodes32bit'; $username = 'demo'; $password = 'skdemo!'; $connection = new PDO($dsn, $username, $password); die( var_dump( $connection ) ); but when I do, I get the error : Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in C:\inetpub\wwwroot\pdoClass.php:7 Stack trace: #0 C:\inetpub\wwwroot\pdoClass.php(7): PDO->__construct('odbc:CS_HDZipCo...', 'demo', 'skdemo!') #1 {main} thrown in C:\inetpub\wwwroot\pdoClass.php on line 7 The $dsn value is the name of the DSN I created in

Creating a DSN-less connection for MS Access within Java

筅森魡賤 提交于 2019-11-27 05:47:59
问题 I'm building a desktop app that needs to communicate with a MS Access database. Now, unless I want to register the DSN for the database on every computer that's going to use the desktop app, I need a way to connect to the database in a DSN-less fashion. I've searched alot and found some useful links on how to create connection strings and based on that I tried modifying my program based on that but without success. The code below fails. If i switch the string in the getConnection to "jdbc

How to programmatically create an ODBC Linked Table to a SQL Server View and have it be editable?

喜你入骨 提交于 2019-11-26 14:39:03
问题 When I create a DSN connection to SQL Server using the wizard, I am able to link it to a view. In this case, Access recognizes it as an editable table. But if I use a DSN-less connection to a view using vba code (Method 1 from https://support.microsoft.com/en-us/kb/892490), it is linked as a table that is NOT updatable. I don't know why there is a difference, but how can I make a connection to a view in SQL Server (either as a table or a query in Access) and have it be updatable? Edit: When I