odbc

Unable to connect to remote mysql server using unixodbc, libmyodbc

▼魔方 西西 提交于 2019-12-23 13:11:42
问题 I'm a little green at this, and I hope the issue I'm having is a simple one...edit: new information at bottom I need to make a connection to a remote mysql (Amazon RDS) database. After following a few tutorials, I have unixodbc and libmyodbc installed and configured on the client, but when I try to connect via isql, I get the error [08S01][unixODBC][MySQL][ODBC 5.1 Driver]Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [ISQL]ERROR: Could not SQLConnect The

MS Access error when connected to ODBC

两盒软妹~` 提交于 2019-12-23 12:59:12
问题 When attempting to add a line in MS Access 2010 in a field which is Varchar not null i am getting the error "you tried to assign the Null value to a variable that is not a variant data type" I am using an ODBC connection from an sql database which allows the empty value in the table but not when trying to add rows in access I believe this to have been a common fault in 2007 from what i have read? Firstly does anyone know if there is a simple work around for this problem? Secondly I can't see

Connecting to a MySQL server using C++

落爺英雄遲暮 提交于 2019-12-23 12:46:24
问题 I'm attempting to connect to a MySQL server using C++ with the MySQL ODBC 5.1 Driver on Visual C++ 2008 Express Edition. I'm following these instructions from MSDN: SQLConnect SQLGetData SQLFetch The only difference is that I have to convert all the SQLCHAR to SQLWCHAR , to match the function params, hopefully that doesn't affect the connection string. Every time I connect I get SQL_ERROR as the return value. So I'm assuming there's something wrong with the connection string or the connection

How to get SQL Server DateTime field in ODBC native client

一曲冷凌霜 提交于 2019-12-23 12:34:09
问题 I'm have SQL Server table: CREATE TABLE [dbo].[Table1]( [rec_id] [int] IDENTITY(1,1) NOT NULL, [id] [int] NOT NULL, [date] [datetime] NOT NULL, [ps] [varchar](200) NULL ) ON [PRIMARY] I'm getting data by a code: status = SQLExecDirect(statement, (SQLWCHAR*)TEXT("SELECT * FROM [DBNAME].[dbo].[Table1]"), SQL_NTS); cout << "SQLExecDirect returned " << status << "\r\n"; if (status == SQL_SUCCESS_WITH_INFO || status == SQL_SUCCESS) { int rec_id; int id; char date[64]; char ps[201] = { 0 }; while

ODBC: How to bind a empty string?

笑着哭i 提交于 2019-12-23 12:04:03
问题 I have a code that binds a string to an ODBC statement that looks like this std::string v = "..."; SQLBindParameter(stmt, c, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, v.size(), 0, &v[0], v.size(), 0) It works for any regular string, but not for empty string. I get an error message instead: Error: [Microsoft][ODBC SQL Server Driver]Invalid precision value I changed the function call to this SQLBindParameter(stmt, c, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, std::max<SQLUINTEGER>(v.size(), 1), 0, &v

“String data, right truncation” warning on a select statement

三世轮回 提交于 2019-12-23 10:15:34
问题 I am upscaling an access 2003 database to SQL Server Express 2008. The tables appear to be created ok and the data looks ok. I have an MFC application that connects to this database. It worked fine connecting to access, but when I connect to SQL Server I am getting the following error on a select statement. DBMS: Microsoft SQL Server Version: 10.50.1600 ODBC Driver Manager Version: 03.80.0000 Warning: ODBC Success With Info on field 0. String data, right truncation State:01004,Native:0,Origin

Custom CRecordset class does not call DoFieldExchange() when useMultiRowFetch is specified

天涯浪子 提交于 2019-12-23 09:42:49
问题 I've implemented a custom CRecordset class, and have code similar to the following: ASSERT(prs->GetRowsetSize() == 25); while (!prs->IsEOF()) { for (int i = 1; i <= prs->GetRowsFetched(); i++) { prs->SetRowsetCursorPosition((WORD)i); // Inspecting data here... } prs->MoveNext(); } prs->Close(); Apparently, when using multi-row fetch, CRecordset does not call my DoFieldExchange override as it does when not using multi-row fetch, and that is by design. And so my data isn't automatically

How to link and ODBC table to MS Access database using VB and without connecting to the server?

亡梦爱人 提交于 2019-12-23 05:17:24
问题 I have a VB procedure that changes a connection string for all 360 linked tables in my Access 2002 database. If I run this procedure using an SQL server in my local network, it runs about 30 seconds. The problem is that I have to use an SQL server somewhere in the Internet. In this case the procedure runs for about 5 minutes. The question is - how can I prevent Access from connecting to the server to check every table I re-connect? An alternative question (maybe more correct). I need to run

How to monitor database updates from application?

此生再无相见时 提交于 2019-12-23 04:45:17
问题 I work with SQL Server database with ODBC, C++. I want to detect modifications in some tables of the database: another application inserts or updates rows and I have to detect all these modifications. It does not have to be the immediate trigger, it is acceptable to use polling to periodically check database tables for modifications. Below is the way I think this can be done, and need your opinions whether this is the standard/right way of doing this, or any better approaches exist. What I've

How to share MS Access 2010 database over the Internet

只愿长相守 提交于 2019-12-23 04:45:10
问题 I have an Access 2010 database that I want to split into two (front and back ends) and share it over the Internet. I have access to MS Windows 2003 Server where I installed the ODBC driver for .accdb files. But now I don't know the next step. Any advice would be appreciated. Thanks. 回答1: Access is very chatty. You won't want the data source to be over the Internet. You might consider giving a virtual terminal login for whoever needs to see the database. Windows Server 2003 allows two terminal