odbc

MySQL ODBC Parameter issue

ⅰ亾dé卋堺 提交于 2019-12-13 02:13:35
问题 Okay, so I'm getting a weird error with this function. It's saying: Exception Details: System.Data.Odbc.OdbcException: ERROR [HY000] [MySQL][ODBC 5.1 Driver][mysqld-5.0.27-community-nt]Column 'CommentNumber' cannot be null But I can verify that the variable commentnumber is indeed getting a value. If I put a Response.Write right before the command.Parameters.Add("@CommentNumber", commentnumber);" line I get 1 returned (which is correct). public string commenter(string commentnumber, string

How to update an Access table via ODBC without loading entire table

烈酒焚心 提交于 2019-12-13 01:25:10
问题 I'm trying to update a local Access 2010 table by pulling data from a remote PostgreSQL database using an ODBC connection. When I manually specify WHERE conditions in the Access update query, I can see on the database server that a limited number of rows are being passed to Access. However, when I make the WHERE condition dynamic---based on the last row in the local Access table---the entire table appears to be pulled into Access and the condition applied in memory (I presume, since it never

ODBC and SQL Server 2008: Can't use prepared statements?

懵懂的女人 提交于 2019-12-13 01:06:28
问题 OK, so I cannot get this to work (either): $stmt = odbc_prepare($conn, "SELECT * FROM Users WHERE username=?"); odbc_execute($stmt, array($username)); $user = odbc_fetch_object($stmt); $stmt = $pdo->prepare("SELECT * FROM Users WHERE username=?"); $stmt->execut(array($username)); $user = $stmt->fetchObject(); Both return the same errors: Warning: odbc_execute(): SQL error: Failed to fetch error message, SQL state HY000 in SQLExecute in user.php on line 24 Anyone know if it's possible to solve

MSSQL VIA FreeTDS, ODBC, and Cpanel Unknown host machine name (severity 2)

纵然是瞬间 提交于 2019-12-13 00:42:04
问题 I have installed FreeTDS 0.91, ODBC, on a Cpanel server running Centos 6.5x64. Everything appears to be running fine and I can connect to the remote MSSQL 2012 server using: /usr/local/freetds/bin/tsql -S sqlserver -U test -P mypassword and succesfully execute queries in the database. I can also connect through: isql -v sqlserverdatasource test mypasswordhere But for some reason /usr/local/freetds/bin/tsql -LH server.ip.here returns no information or errors which doesn't make much sense when

MSSQL+ODBC+PHP = 0 rows in result

给你一囗甜甜゛ 提交于 2019-12-13 00:14:27
问题 I'm using remote MSSQL base via php + linux ODBC. All was fine, but today i wrote query with SET + PIVOT and got error: [unixODBC][FreeTDS][SQL Server]SELECT failed because the following SET options have incorrect settings: 'ANSI_NULLS, QUOTED_IDENTIFIER, CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or

Unable to select a system DSN when adding a data connection to Server Explorer

橙三吉。 提交于 2019-12-12 23:38:06
问题 In Visual Studio 2010, attempting to use the Server Explorer to add a data connection. From the Change Data Source screen I select Microsoft ODBC Data Source which moves me to the Add Connection screen. However, the dropdown for Use user or system data source name: only contains my user DSNs. My system DSNs are not shown. I'm running on Windows 7, 64 bit and ran Visual Studio as administrator. The missing system DSNs use the SQL Server Native Client 10.0, but an equivalent user DSN using the

Replication between SQL Server and MYSQL

大憨熊 提交于 2019-12-12 23:08:04
问题 I am trying to set up replication between SQL Server 2008 and MYSQL. I have installed a MySQL ODBC 5.1 driver on the MySQL server. Initially I was trying to just set up a linked server between the two databases which is working fine. However now I am trying to set up replication in SSMS. I have created a simple publication but I am having problems setting up the subscriber. The only heterogeneous datasources it seems I can set up under Oracle and IBM. I do however think that I should be able

How do I specify the ODBC Access Driver Format when creating the database

瘦欲@ 提交于 2019-12-12 18:43:56
问题 Using C, I am trying to create an Access 2007 database file using ODBC by way of the SQLConfigDataSource function. char szDriverName[] = "Microsoft Access Driver (*.mdb, *.accdb)"; char szAttr[] = "CREATE_DB=c:\access2007.accdb"; SQLConfigDataSource(NULL, ODBC_ADD_DSN, szDriverName, szAttr); I want the file extension of the new database to be .accdb but when I run the code above, I always get c:\access2007.accdb.mdb. I can specify 12.x (accdb) or 4.x (mdb) from ODBC Admin as in the image

connection string of jdbc odbc with MS access

六月ゝ 毕业季﹏ 提交于 2019-12-12 18:24:20
问题 I am trying to make jdbc odbc connection with ms access but not able to pass the password which is consisted from special characters I am using the following code try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con=DriverManager.getConnection("Jdbc:Odbc:Driver={Microsoft Access Driver(*.mdb); DBQ=d:/abc/xyz.mdb};","","password here"); Statement st=con.createStatement(); } catch(Exception ex) { } but this is not recognising the password here even the password is much complex

Using SQL stored function gives invalid SQL statement

元气小坏坏 提交于 2019-12-12 17:24:45
问题 I'm trying to use stored function from Oracle Express database in c# application. OdbcCommand com = new OdbcCommand("SILNIA",sqlConn); com.CommandType = CommandType.StoredProcedure; OdbcParameter sqlParam = new OdbcParameter("@ReturnValue", OdbcType.Int); sqlParam.Direction = ParameterDirection.ReturnValue; com.Parameters.Add(sqlParam); com.ExecuteNonQuery(); label1.Content = com.Parameters["@ReturnValue"].Value.ToString(); where SILNIA function (compiles without errors) is defined: create or