📄 00000000.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: Zeemon (塞下秋), 信区: Visual <BR>标 题: C++ Builder常见问题解答(2) <BR>发信站: BBS 水木清华站 (Wed Dec 3 19:30:48 1997) <BR> <BR>第二部分 BDE <BR> <BR>1、BDE Version problems <BR> <BR>Question: <BR>I have more than one installation of the Borland Database <BR> Engine and I am having troubles configuring the BDE to work <BR>with either Delphi, C++Builder, or IntraBuilder. <BR> <BR>Answer: <BR>Run regedit to see what your current path is for your DLLPATH <BR>under HKEY_LOCAL_MACHINE\software\Borland\Database Engine. <BR>There should be one and only one path for this key. If <BR>there is more than one, it will result in problems. <BR>Furthermore, the CONFIGFILE01 key should point to your latest <BR>config file. <BR> <BR>One way to resolve problems arising from <BR>conflicting installations of the database engine is to <BR>reinstall the version of Borland's compiler or <BR>tool (either Delphi, Intrabuilder, or C++Builder) that has the <BR>latest version of the BDE. Then edit the DLLPATH in the registry so <BR>that it uses the default that the installation program gave. <BR> <BR>This works because the latest version of the BDE is backward <BR>compatible which means that it will run applications written <BR>with previous versions of the BDE. <BR> <BR>2、How to delete ODBC drivers <BR> <BR>Question: <BR>How do I delete ODBC drivers? Once I remove them with <BR>the IDAPI configuration tool, save, exit and come back <BR>into the configuration utility, its still there. <BR> <BR>Answer: <BR>Removing the 'Database Engine' registry entry, <BR>and running the BDE install, fixes the problem. <BR> <BR>3、Error 'ODBC is either not installed or corrupt' <BR> <BR>Question: <BR>When I try to add a new ODBC driver under my installation <BR>of the BCB 1.0 product I get the error odbc is either <BR>not installed or corrupt. Has my installation failed or <BR>is it missing something? <BR> <BR>Answer: <BR>This happens if you try "Install new ODBC driver" from <BR>the BDE without first installing any 32 bit odbc drivers on <BR>your system. <BR> <BR>BCB 1.0 does NOT ship with any ODBC drivers. They must be <BR>purchased seperately from MS or Intersolve. <BR> <BR>If control panel does NOT have an icon labeled 32-bit ODBC, then <BR>no 32-bit drivers have been installed on the machine. <BR> <BR>4、ODBC Data sources in the BDE <BR> <BR>Question: <BR>Why does only one Data Source name show up in the BDE <BR>configuration utility when I add a new ODBC driver? I know I <BR>have more than one Data Source. <BR> <BR>Answer: <BR>This is probably the result of a bug. <BR>To work around this, with the 'Default <BR>Data Source Name' combo box selected, use <BR>the arrow keys to select the correct <BR>data source. <BR> <BR>5、IDAPI/BDE install errors <BR> <BR>Question: <BR>I run the install and get a message saying that the install is <BR>having trouble locating files associated with the bde or idapi. <BR>I click ok and the install finishes. BCB boots up fine but I <BR>get the error " cannot initialize the Borland Database Engine " <BR>or something similar. This occurs when I launch the BDE <BR>configuration utility, database desktop or use BCB's <BR>database capabilities in a project. Why is the install failing? <BR> <BR>Answer: <BR>This problem is often caused by InstallShield conflicting with a <BR>drive that is doublespaced using the DoubleSpace disk compression <BR>utility. Solution is to decompress the drive or install to another <BR>drive. <BR> <BR>6、Can I use Older SQL links? <BR> <BR>Question: <BR>Can I use older versions of SQL Links use those with the IDAPI <BR>that ships with other Borland products? <BR> <BR>Answer: <BR>No. <BR> <BR>7、dBase Record #'s <BR> <BR>Question: <BR>How do you go to a specific record Number in a DBase Table? <BR> <BR>Answer: <BR> void __fastcall gotoRecord(TTable* T, int RecNo) <BR> { <BR> DBIResult rslt; <BR> TResyncMode rm; <BR> <BR> rslt = DbiSetToRecordNo(T->Handle, RecNo); <BR> if (rslt != DBIERR_NONE) <BR> { <BR> if (rslt == DBIERR_EOF) <BR> T->Last(); <BR> if (rslt == DBIERR_BOF) <BR> T->First(); <BR> } <BR> <BR> T->Resync(rm<<rmExact); <BR> } <BR> <BR>8、Multiple records found but only one expected <BR> <BR>Question: <BR>I am getting a DBEngine message when editing a record that says <BR>"Multiple records found but only one expected". What does this <BR>mean? <BR> <BR>Answer: <BR>You may need to create a unique index on the table so that each <BR>row can be uniquely identified. That *may* first require <BR>altering the table and adding a column to be populated with <BR>unique values. <BR> <BR>9、Repairing corrupt Paradox tables <BR> <BR>Question: <BR>Is there a BDE API or a DLL available for rebuilding crashed <BR>indexes (like the TUTILITY.EXE shipped with Pdoxwin)? <BR> <BR>Answer: <BR>The BDE includes a function to rebuild indexes, called <BR>DbiRegenIndexes(). <BR> <BR>10、BDE functions and data types <BR> <BR>Question: <BR>Where do I find a listing and description of the BDE functions <BR>and data types? <BR> <BR>Answer: <BR>BDE.INT in your BCB\DOC\ directory contains a listing of <BR>BDE functions, expected parameters, return values and a brief <BR>description of each. <BR> <BR>For any BDE function call include the BDE.HPP Header file. <BR>For more detailed information on the use of the IDAPI functions, <BR>obtain the Database Engine User's guide from Customer Service. <BR> <BR>11、Cannot find method to pack database <BR> <BR>Question: <BR>I can't find a method to pack a database file at run time. <BR> <BR>Answer: <BR>The VCL does not encapsulate all of the BDE functions calls, but <BR>you can call the BDE directly for functions not encapsulated. <BR>Here is a example of calling the BDE DbiPackTable() function. <BR> <BR>DBIResult DBIFN DbiPackTable (hDb, hCursor, pszTableName, <BR> [pszDriverType], bRegenIdxs); <BR> <BR>- hDb is the handle to the database <BR>- hCursor is a handle to the cursror <BR>- pszTableName use the table name from you VCL calls. <BR>- bRegenIdxs is a boolean ti indicate if you want indexes <BR> regenerated. <BR> <BR>Look at BDE.HPP in VCL include directory for more information. <BR> <BR>-- <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: sapphire.ncic.a] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -