milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home

DBX Error - ParameterNotSet

Details
Written by: Stanko Milosev
Category: dbExpress
Published: 16 September 2010
Last Updated: 18 December 2011
Hits: 6711

If you tried something like:

with cds1.Params do
begin
  ParamByName('finish').AsDateTime := now;    
  ParamByName('start').AsDateTime := Now-1;  
end;
cds1.Open

And you received error like: DBX Error - ParameterNotSet then don't use AsDateTime, use AsSQLTimeStamp := DateTimeToSQLTimeStamp(Now-1);, so your code should look like:

with cds1.Params do
begin
  ParamByName('finish').AsSQLTimeStamp := DateTimeToSQLTimeStamp(now);    
  ParamByName('start').AsDateTime := DateTimeToSQLTimeStamp(Now-1);  
end;
cds1.Open

MySQL

Details
Written by: Stanko Milosev
Category: dbExpress
Published: 05 November 2009
Last Updated: 05 November 2009
Hits: 6792

If you added DBXDynalink to your uses list, deployed:

dbxconnections.ini
dbxdrivers.ini
dbexpsda40.dll

Tried everything what is described here.

Then, try also:

ConnectionName = 'MYSQLCONNECTION'
DriverName = 'MySQL'
GetDriverFunc = 'getSQLDriverMYSQL'
LibraryName = 'dbexpmda.dll'
VendorLib = 'libmysql.dll'

PChar vs Pointer.

Details
Written by: Stanko Milosev
Category: dbExpress
Published: 17 November 2008
Last Updated: 30 November -0001
Hits: 6283
If you use FillChar on a variable which is type of PChar, you will loose pointer, and FreeMem will not work.

Exception handling

Details
Written by: Stanko Milosev
Category: dbExpress
Published: 08 August 2008
Last Updated: 25 January 2010
Hits: 7083

Problem with dbExpress is that it does not raise an exception if anything is wrong in database (for example, if you try to add primary key which already exist). So, to get an exception, best would be to use OnReconcileError in TClientDataSet... Small example:

procedure Tdm.cdsReconcileError(DataSet: TCustomClientDataSet;
E: EReconcileError; UpdateKind: TUpdateKind; var Action: TReconcileAction);
begin
ShowMessage(e.Message);
end;

  1. Get handle of IE8 window.
  2. Google maps
  3. How to fill a form of PhpBB3 with Delphi?
  4. Nostalgia

Subcategories

C#

Azure

ASP.NET

JavaScript

Software Development Philosophy

MS SQL

IBM WebSphere MQ

MySQL

Joomla

Delphi

PHP

Windows

Life

Lazarus

Downloads

Android

CSS

Chrome

HTML

Linux

Eclipse

Page 92 of 168

  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96