dbExpress下SQLQuery的一个问题

denny001 2003-08-21 05:29:33
有如下一个表,在oracal中,rq datetime,sd num,bjdj num
SQLQuery1.commandtext:='update PRICE_FORE_USER_PRICE set BJDJ = :bjdj where RQ= :rq and SD = :sd'
给sd选择类型的时候,发现不管选什么都会被报'非法的变量名/编号'.
怎么回事阿?
...全文
39 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
denny001 2003-09-08
  • 打赏
  • 举报
回复
我自己来结吧,确切的说这是一个SQL的错误,参数是只能用在where以后的,这种SQL好像只能用拼SQL的方法来做,有其他的高见么?本人洗耳恭听,如果还没人回就结贴了
apan_bj 2003-08-28
  • 打赏
  • 举报
回复
up...
denny001 2003-08-22
  • 打赏
  • 举报
回复
确切的说应该就在这里,我把参数一个个去掉,发现只要有sd这个参数就一定会报错,而且是参数类型错误,几乎试了所有的参数类型都不对,再搞不定我就打算不用参数来拼SQL了,rq这个参数是timeStamp类型的,所以可以不用to_date,要是用to_date的话就该传ftstring进去了
zousoft 2003-08-21
  • 打赏
  • 举报
回复
你再研究一下,问题可能出在别处。 把代码贴全点。
fenglaile 2003-08-21
  • 打赏
  • 举报
回复
rd 的原因,'update PRICE_FORE_USER_PRICE set BJDJ = :bjdj where RQ=to_date(:rq,''yyyy-MM-dd'') and SD = :sd';
try again
eliphe 2003-08-21
  • 打赏
  • 举报
回复
跟踪一下,看哪段代码出的问题,不就找到原因了。

对了,出现这种情况,可能是你的字段名不对或类型出错。
Delphi 7.1 Update Release Notes=======================================================This file contains important supplemental and late-breakinginformation that may not appear in the main productdocumentation, and supersedes information contained in otherdocuments, including previously installed release notes.Borland recommends that you read this file in its entirety.NOTE: If you are updating a localized version of Delphi 7, visit the Borland Registered User web site to obtain a localized readme file that may contain important late- breaking information not included in this readme file.IMPORTANT: Delphi must be closed before installing this update. =====================================================CONTENTS * INSTALLING THIS UPDATE * UPDATING LOCALIZED VERSIONS OF DELPHI 7 * KNOWN ISSUES * ISSUES ADDRESSED BY THIS UPDATE - IDE - CORE DATABASE - DATASNAP - DBGO (ADO COMPONENTS) - dbExpress - dbExpress COMPONENTS AND DB VCL - dbExpress CORE DRIVER AND METADATA - dbExpress VENDOR ISSUES - dbExpress CERTIFICATION - WEB SNAP - ACTIVEX - COMPILER - RTL - VCL - THIRD PARTY - BOLD FOR DELPHI * VERIFYING THAT THE UPDATE WAS SUCCESSFUL * FILES INSTALLED BY THIS UPDATE =======================================================INSTALLING THIS UPDATE* This update can not be applied to Delphi 7 Architect Trial version. * This update can not be removed after it is installed.* You will need the original Delphi 7 installation CD available to install this update.* To install this update from the CD, insert the CD, and launch the d7_ent_upd1.exe file appropriate for your locale.* To install this update from the Web, double-click the self-executing installation file and follow the prompts. * The Delphi 7 documentation PDF files are available on the update CD.========================================================UPDATING LOCALIZED VERSIONS OF DELPHI 7* This update can be applied only to the English version of Delphi 7. There are separate updates for the German, French and Japanese ver
Product Description Universal Data Access Components (UniDAC) is a library of components that provides direct access to most popular database servers from Delphi, Delphi for .NET and, C++Builder. UniDAC can work with such servers as Oracle, Microsoft SQL Server, MySQL, Interbase, Firebird. The UniDAC library is designed to help programmers develop faster and cleaner cross-database applications. UniDAC is a complete replacement for such standard universal technology as dbExpress. UniDAC is a handy in use and efficient data access solution bringing into play many features specific to each server. Requirements UniDAC is a product joining functionality of such data access solutions as ODAC, SDAC, MyDAC, and IBDAC. Requirements of UniDAC depend only on used providers. Detailed requirements for each provider can be found in the Requirements topic in the UniDAC Help documentation. Installation Compiled versions of UniDAC are installed automatically by the UniDAC Installer for all supported IDEs. Versions of UniDAC with Source Code must be installed manually. For more information, see the Installation topic of the UniDAC Help documentation. It is important to know that UniDAC, ODAC, SDAC, MyDAC, and IBDAC use the common base packages, so product compatibility is provided for the current build only. In the other words, if you upgrade one of the installed providers, it may conflict with older builds of other products. In order to continue using the products simultaneously, you should upgrade all of them at the same time. 7.1.4 29-Sep-17 InterBase data provider Bug with the "Input parameter mismatch" error for procedure is fixed Bug with transactions when working with Firebird 2.5 is fixed 7.1.3 19-Sep-17 The performance of TVirtualQuery is significantly improved Application-defined functions in TVirtualQuery are supported Application-defined collations in TVirtualQuery are supported AutoInc fields in TVirtualTable are supported Bug with assertion failure when updating a record in TVirtualQuery is fixed Bug with compatibility with TkbmMemTable in TVirtualQuery is fixed Bug with complex WHERE clauses that have several string fields in TVirtualQuery is fixed Bug with selecting from a dataset with a single record in TVirtualQuery is fixed Bug with generating SQL for batch updates is fixed Bug with the Locate method for non-Windows platforms in Lazarus is fixed Bug with the FindFirst, FindLast, FindNext, FindPrior methods in Lazarus is fixed Bug with accessing a product help from the IDE menu is fixed Bug with recreating fields when calling Open after Prepare is fixed Bug with an incorrect error message when using the Connect dialog component on mobile platforms is fixed Bug with AV failure when using calculated fields in TClientDataset is fixed Bug with a key violation error when executing batch operations is fixed Bug with Assert when calling the Locate method in the SmartFetch mode is fixed Bug with using DAC components in DataModule for Linux is fixed Cloud data providers BigCommerce provider is added Dynamics CRM provider is added FreshBooks provider is added Magento provider is added MailChimp provider is added NetSuite provider is added QuickBooks provider is added Salesforce provider is added Salesforce Marketing Cloud provider is added SugarCRM provider is added Zoho CRM provider is added Oracle data provider Oracle 12c connection modes (SYSBACKUP, SYSDG, SYSKM) in the Direct mode are supported OS authentication in the Direct mode is supported NChar literal replacement is supported CLOB parameters behavior when UnicodeEnvironment=True is improved Bug with lost chars in a parameter value when ConvertEOL=True is fixed SQLServer data provider Bug with processing varchar fields when AutoTranslate is True in the Direct mode is fixed Bug with processing a field with alias for query with the JOIN statement is fixed Bug with date and time fractional seconds precision when DescribeParams = True is fixed MySQL data provider Azure Database for MySQL is supported JSON data type is supported InterBase data provider Support for Firebird on Android platform is added Support for Firebird 3 packages is added Aliases handling in the RETURNING clause is supported The WireCompression connection parameter for Firebird 3 is supported Bug with using BLOB data type in batch operations is fixed Bug with the OnBackupProgress event handler in TUniDADump is fixed Bug with using batch parameters of the Bytes type is fixed Bug with closing a connection that has an active transaction for Firebird 3 is fixed Bug with recreating a connection on Linux and mobile platforms is fixed PostgreSQL data provider SSPI authentication is supported Processing GUID data type for the TGuidField class is improved SQLite data provider Now the Direct mode is based on the SQLite engine version 3.20.0 Custom SQL aggregate functions are supported Bug with opening an existing database on iOS 64 is fixed Bug with detecting field types is fixed Bug with international symbols in non-Unicode Delphi versions is fixed Bug with low performance of the LoadFromDataSet method of the Loader component is fixed Bug with index backup using the Dump component when the TableNames property is set is fixed DBF data provider The CodePage specific options are added The ConnectMode specific options are added Bug with using CDX indexes is fixed DB2 data provider The DECFLOAT data type is supported 7.0.2 15-May-17 Bug with using TVirtualQuery with TVirtualTable is fixed Bug with processing NULL values in the Loader component is fixed Bug with executing a query after executing a batch command is fixed Bug with executing a batch operation inside an explicitly started transaction is fixed Bug with using the AsGuid property is fixed Oracle data provider Bug with authentication in the Direct mode is fixed MySQL data provider Bug with processing DATETIME fields is fixed SQLServer data provider Bug with the "Invalid column name" error when editing a query with the JOIN statement is fixed InterBase data provider Bug with memory leak when using the SQLMonitor component is fixed PostgreSQL data provider Bug with AV failure after executing the Ping method is fixed SQLite data provider Bug with creating a database in the Direct Mode on Android is fixed

2,497

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 数据库相关
社区管理员
  • 数据库相关社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧