This is an archive of CompuServe forum messages from 1985 to 1995, as saved in transcripts by John Foust.
Search Results (67 messages)
Adding Records
Message #30704
I have a question regarding CRecordsets. Here's the situation: 1) If I have an empty table, I can insert as many records as I want w/o a problem. 2) If the table is not empty, trying to add a record with the same routine fails. The failure is caused by…
Q113815 and more
Message #30702
I am still getting the "General error: Unable to create file buffer" as described in Q113815 even after patching ever CRecordset in my app. I have even put a breakpoint on line 1187 of dbcore.cpp for when (m_pDatabase == 0). This should break if any of my code doesn't close…
OBDC and Wildcards
Message #30689
I have a question. I am using the database class's from MFC. I have everything working fine. I have paramaterized the m_strFilter and this works fine. I am using the paradox driver for the time being as all my old data is in paradox. My question is how does one…
Ronald, The beta will be underway Real Soon Now, and is supposed to be narrow and fast. If someone intends to lean on the drivers and provide good feedback and can communicate those facts to the appropriate parties, they might have a good chance of getting in even though it's…
CRecordSet::Open()
Message #30675
Dear SYSOP, I've written a DLL containing among other things a function that opens an Access 1.1 database. When this function is called by a small C++ program, there is no problem. But this fuction is supposed to be called by a more complex application written with Visual Basic. In…
LoadString failed
Message #30674
Dear SYSOP, I've noticed that MFC sometimes put a message in DBWIN that says: File dbcore.cpp, Line 51, Assertion Failed! Looking at that code, it seems that a string supposed to be in the string table is not found. Of course because it isn't in the string table. So my…
REPORT
Message #30657
I am working on a database application in C++ using MFC. I would like to include several canned reports of certain queries / tables. Can any body recommend certain VBX's and/ or DLLs that Could be of help. Thanks a lot!!
Hi Paul, This is a known problem. Here is the text of an upcoming Microsoft Knowledgebase which discusses the situation: Program Crash When Connecting to a Data Source from a DLL ———————————————————————- The information in this article applies to: – Microsoft Foundation Classes for Windows, version 2.5 ———————————————————————- SYMPTOMS ========…
#29872-
ODBC Tales
Message #30650
We can't really talk about it now, but we will certainly post information in this forum when it becomes available. Steve Roeder Microsoft Developers Support
#30167-
ODBC in DLL
Message #30649
Hi Craig,
m_strFilter Problem
Message #30645
Hi Ted, The syntax for the m_strFilter string should be: m_strFilter = "Location = 'OverThere'"; Steve Roeder Microsoft Developers Support
#29440-
ODBC Class from Non-MFC
Message #30642
Hi Doug, I don't understand… It did not link right? The next part of you message describes a bunch of link errors, how did you get a GP fault? Where does the GP fault occur? These functions are defined in one of the Windows libraries: SHELL.LIB. Make sure you include…
ODBC; case insens txt fl
Message #30640
I am using ODBC from Visual C++/MFC. I want to have filters and sorts that are case insensitive. For the filters I tried this: SELECT … WHERE upper(NAME) = upper('Jordan'); Apparently 'upper' is not implemented in ODBC. What is the proper way to have case insensitive text fields? — Jordan
John, i will check it out, thanks for the info and the indication that i will have to be patient if i want to join the s, Jan
Ronald, thanks for the info, Jan
I have found that the problem is with a header file from Protogen that was causing the trouble. It seems when the file is included prior to afxdb, the problem arise, if after all seems to work fine. I have just about given up on protogen and am finding classwizard…
#30129-
OOP Recordset puzzle
Message #30610
Brian, Why is this approach less object-oriented? If you needed stock for all these machines (assuming for the moment they are CNC multiple-spindle machine tools, as an example), you wouldn't run to the steelyard once for each machine; instead, you'd stock a local inventory and have each operator fetch stock…
Thanks, Norbert. Now that you explain it, I'm not sure I will run into this problem, but it's nice to know the solution in case I do.
Group by clause for set
Message #30579
Has anyone successfully used the 'GROUP BY' clause with the Database Classes? Any examples?
There is a white paper over in WinEXT about the Access Jet Engine 2.0. It talks briefly about ODBC. The new ODBC driver is supposed to use the full Jet Engine instead of a subset as 1.0 did. It also talks about the index structure and support for optimal index…
Using henvAllConnections
Message #30576
I'm still having problems accessing the static member of CDatabase, henvAllConnections. Here is an example of my code: void CMyDatabase::Open() // derived from CDatabase { AllocConnect(); // Just in case henvAllConnections isn't connected yet char acDSN[SQL_MAX_DSN_LENGTH+1]; char acDesc[256]; short iDSNLen; short iDescLen; CStringArray astr; ::SQLDataSources(CDatabase::henvAllConnections, SQL_FETCH_FIRST, (unsigned char*)&acDSN, SQL_MAX_DSN_LENGTH, &iDSNLen,…
Max no CRecordsets…
Message #30565
Hi! I followed the CRecordset bug discussion, but have the following question: I am writing a MDI app, where Users open documents, that are records from a database. Because users can edit these forms on-line, I create a recordset for every document (OnOpenDocument), fietered by the filenumber. I keep the…
CColumns Exception
Message #30563
I am using the CColumns class that comes with the catalog's mfc sample. Since I am only interested in 2 -3 attributes about each field I decided to trim down the information I am retreiving/binding. When retrieving an integer field I always got an exception informing me that The RFX…
Can you recommend a good/cheap/win32 compatible ISAM library?
Jan, I think it will start in a month or so. -Ronald-
Israel, When I double checked the info before posting it to you, I also came across CanTransact in CRecordset and I wondered about what made that one special as well. So… I looked at the source and found that CRecordset::CanTransact is essentially implemented as return m_pDatabasem_bTransactions So I really wonder…
Hi Ronald, thanks for the info, > It does seem that the beta will be > reasonably wide, so you might want to take > your chances and apply. is the s-program starting in the near future? > the current drivers are being scrapped > for technical reasons 🙂 Jan
File Handle Limit!
Message #30511
We are using Microsoft Visual C++ 1.5 to write an ODBC application. I have opened two tables from an Access database, one table from another Access database, one table from a dBase III database, one table from a dBase IV database, and one table from a FoxPro 2.0 database. With…
Roby Thanks for your answer. In my case, I'm just begining my tests with odbc and the table I used for testing it have not index at all, but I have records that are replicated (ave the saem value in all fields). In the other side I imagine that if…
Ronald Thanks for your help. I really was looking on the wrong place. I think I was induced to it because I found in the recordset the CanTransact function. May be this function should also be only in CDataBase, or is there something special in this case that makes this…
Israel, There isn't a function per-se. If yoi want to avoid going crazy waiting, your best bet is to use CDatabase::ExecuteSQL("delete from Mytable") which will get rid of all your records in the table. An even faster option for very large tables is to drop the table and then recreate…
Israel, What probably happened is that you did not select all the coulumns (fields) that make up a specific row. Even if you need only a few fields from the select, you still need to include all the fields making up a unique index. The cursor library will turn a…
Israel, As always with SQL, this is determined internally. One of the purposes of SQL is to shield you from explicitely specifying the access path. In most production databases however, you can influence the optimiser. Usually either by the order in which you specify the tables or by giving 'hints'…
CJ, No, they don't work with the Access Driver. -Ronald-
Jan, No, I don't have any solid info at all at the moment. It does seem that the beta will be reasonably wide, so you might want to take your chances and apply. My only guess as to why the new drivers will be much better is that MS made…
#29986-
ODBC Tales
Message #30493
Ronald, >>The only problem with the Watcom single user runtime is that it doesn't allow table structure changes or creation of new tables. Watcom insists that they have a new version that allows you to do this; it's in something called the "Gold Disk", which their sales reps supposedly know…
#30195-
Centering a Form Window
Message #30491
Rick, Glad it helped, Jim
Max no of CRecordsets?
Message #30489
Well, I have found a solution for my problem (it was in the KBase). Search for CRecordset and Bug. There is a bug in the CRecordset destructor. Each CRecordset::Open call creates a temporary file in the TEMP directory. If you delete your CRecordset derived object without expocitly closing it before,…
Well, I have found a solution for my problem (it was in the KBase. Search for CRecordset). There is a bug in the CRecordset destructor. Each CRecordset::Open call creates a temporary file in the TEMP directory (at least the access odbc driver does). If you delete your CRecordset derived object…
#29532-
#Database Link Errors
Message #30483
Hi Thomas,
#29943-
CLongBinary > 64K
Message #30482
Dan, when I recompile the release version of the MFC (lafxcw.lib and lafxdw.lib), I obtain files bigger than the original versions. lafxcw.lib : 2'230'873 bytes instead of 999'513 bytes lafxdw.lib : 2'145'171 bytes instead of 938'387 bytes that difference is too big. Here is the command I used: nmake MODEL=L…
#29832-
SQL Data Sources Dialog
Message #30479
Hi Rob, The syntax you gave: Open(DatabaseName) is not correct for the CDatabase::Open member function. You need to pass as the first parameter "DSN=". See the documentation for CDatabase::Open and the section "Data Source:Managing Connections" in the Database Classes manual for more information. Also, you should use the ODBC Administrator…
#29994-
changing Index using SQL
Message #30475
Hi Pat, There should bee help files installed in the \WINDOWS\SYSTEM subdirectory for each ODBC driver you have installed. It will tell you if a certain SQL grammer is supported or not. You can simply search on "DROP INDEX" to see what it says. Unfortunately, the Access help file, DRVACCSS.HLP,…
Ronald, > or wait for the (undoubtably) much better > flat file MS ODBC drivers that are coming > out somewhere round 3Q94. that would be nice, do you have more info on this like what indexes are they going to use/support? Just curious, Jan
I found that the query you used to obtain the record you wish to delete *must* be indexed on a unique field. If there is any ambiguity regarding the unique nature of the record in the return set (whether or not it really is unique), you will receive the 'Multiple…
Chris, Requery DOES NOT work when you change the filter or sort clauses, this is stated wrong in the docs. It will only work with parametrised recordsets. So what happens is that close/open, does a new SQLPrepare and then a SQLExecute while Requery only does the SQLExecute. This may be…
#30169-
#transactions
Message #30401
Israel, You probably didn't find the functions because you were looking in the wrong place. the functions "BeginTrans", "CommitTrans" and "Rollback" are members of CDatabase. This makes sense because transactions work across recordsets, i.e. if you commit a transaction, work performed in all recordsets will be committed. -Ronald-
#30001-
Filtering CRecordSet
Message #30400
Simon, Requery does not work for changed filters, the docs are wrong, it only work for parametrised recordsets. You should look at the knowledgebase (GO MSKB) for a list of articles about the problems with requery. Try searching for "MFC" and "requery". -Ronald-
#29994-
changing Index using SQL
Message #30399
Pat, Use Access. I have found it essential to have a copy of Access when working with Access files. Some things like creating counter fields are only possible (as far as I know) using Access itself or maybe using VB. -Ronald-
#30154-
#ODBC Tales
Message #30398
David, If you only have the SQL server driver, you have nothing at all. This driver's only purpose in life is to act as a liaison between your app and a running copy of SQL Server. So this is not really a good choice for a standalone app. As I…
Page 1 of 2