Delphi2010中使用ansi编码编译程序

Delphi2009和Delphi2010中,默认的字符编码已经是unicode了,使得原本的一些控件都产生兼容性问题,如果想不修改编码就在Delphi2009和Delphi2010上编译Delphi2007的项目,可以使用 {$H+} 编译预处理,这将把字符串编码设为Ansi,而不是使用默认的Unicode。

【摘自】浅谈Delphi2009控件移植

SQLite Wrapper for Delphi

 

  • Aducom’s SQLite: Open source (NewBSD) Delphi (4..2007) C++ (BCB5, 6, 2007) and 2009/2010 components for SQLite V2.8.x and V3.x.x. (like TASQLiteDB, TASQLiteQuery, TASQLiteTable, TASQLiteUpdateSQL and others). No need for the BDE but Delphi standard edition is not supported. Support for static linking (no dll needed), utf-8, utf-16 and unidirectonal dataset. (updated 1 dec 2009)
  • RemObjects AnyDAC: High-speed, universal data access engine for SQLite, Firebird, MySQL, MS SQL Server, Oracle, PostgreSQL, Interbase, MS Access, IBM DB2, Sybase ASA, DbExpress, ODBC, that simplifies the task of building CodeGear Delphi, C++Builder and Free Pascal Compiler database applications. (commercial)
  • Devart Universal Data Access Components (UniDAC) – a library of nonvisual cross-database data access components for Delphi, Delphi for .NET, C++Builder, and FreePascal. The list of supported databases includes Oracle, Microsoft SQL Server, MySQL, InterBase, Firebird, PostgreSQL, and SQLite.
  • ZeosLIB: The ZeosLib is a set of database components for MySQL, PostgreSQL, Interbase, Firebird, MS SQL, Sybase, Oracle, DB/2, SQLite (2.8.x & 3.x – in cvs) for Delphi, Kylix, C++ Builder, Lazarus
  • DISQLite3: The fully embedded, no-DLL SQLite3 solution for Delphi (D4, D5, D6, D7, D2005, D2006, D2007, D2009) including FTS1, FTS2, FTS3, R-Tree, and encryption. DISQLite3 compiles with Delphi standard / personal and does NOT require sqlite3.dll. It provides the complete SQLite3 API, is regularly updated, very small, well documented, tightly integrated, and carefully optimized. As a result, DISQLite3 outperforms sqlite3.dll up to 50% for common operations. Free personal edition.
  • Fast and lean wrappers, browser, date/time and soundEx functions http://www.it77.de/sqlite/sqlite.htm ("Last update 28.05.2004")
  • Simple SQLite 3.0 wrapper, no TDataset or databinding, but fast and easy to use. Free for any purpose. Uses external sqlite3.dll for easy updating. Supports Delphi 2009. http://www.itwriting.com/blog/?page_id=659. Last Update 16 October 2008.
  • Delphi class for SQLite. http://www.torry.net/db/direct/db_directsql/tsqlite.zip (As of 30 April 2007, ‘Error 404. Missing File.’)
  • LibSQL – Delphi/Kylix/Freepascal interface for SQLite, MySQL and ODBC32. http://sourceforge.net/projects/libsql
  • Dataset descendant for SQLite: http://sourceforge.net/projects/sqlite4delphi (** dead project **)
  • SQLitePass library : SQLite Pass is a simple set of components designed for Lazarus-fpc and Delphi, to give access to SQLite databases. This project is open source, released under LGPL license. Those libraries and components are free.SQLite Download : http://source.online.free.fr
  • SqliteWrap Simple Sqlite3 wrapper based on work of Tim Anderson. It have cleaned code and some additional features. http://www.ararat.cz/doku.php/en:sqlitewrap
  • ___________________

    [From] SQLite Wiki

    lazarus 使用Delphi的dll导出类的问题

    Delphi的DLL导出类的方法,无外乎就是利用TClass的特性,就是,定义要导出类的Class类,即比如说,要导出的类是TMyObject,那么就定义

    TMyObjectClass=class of TMyObject

    在导出函数里面,使用TMyObjectClass变量,可以在参数里面使用var或者直接返回。

    类似于

    function GetMyObject(var MyClass:TMyObjectClass):Boolean;stdcall;

    或者

    function GetMyObject:TMyObjectClass;stdcall;

    在Lazarus里面,声明函数为

    type
     TGetMyClass = function(var MyClass:TMyObjectClass):Boolean ; stdcall; 

    使用方法

    继续阅读

    delphi IDE : danger stack overflow 错误

    最近,Delphi2007,启动时,会出现如下错误,确定后,ide没反应,死掉,只能强制结束。

     image

    参考:Found the reason of "Stack overflow"

    那边说的是mmx 7.10过期了

    可是,我的delphi都没有载入mmx,就比较奇怪了。

    应该不是mmx的问题,用Delphidistiller重置了也没用

    临时解决办法:

    用DelphiDistiller 禁用掉start page ide package 后,IDE可以启动,可以编译。

    由此可见,问题应该在IE,想办法重装IE。

    ___________

    ps:

    重装ie也不管用,重装系统后,解决

    lazarus的串口控件SynaSer

    记录一个lazarus的串口控件SynaSer serial library

    支持win32和Linux,可惜不支持wince

    主要是Synapse TCP/IP library控件,用于delphi。

    简单使用方法,算是有点怪异的。

    var
      ser:TBlockSerial;
    begin
      ser:=TBlockserial.Create;
      try
        ser.RaiseExcept:=True;
        ser.Connect(‘COM2’);
        ser.Config(19200,8,’N’,0,false,false);
        writeln (ser.ATCommand(‘ATI8’));
      finally
        ser.Free;
      end;
    end.

    下载

    lazarus 奇怪的“compilation aborted”错误

    今天编译一个lazarus的项目,发现只要编译,就会出现

    xxxx.pas(1,1) Fatal: Compilation aborted

    没有其他的错误指示。

    在尝试替换ide,都发生相同的错误后,可以确定错误在pas文件里面。

    经过比对之前的代码,发现在添加了如下代码后出现编译错误

    property Device:TDevice index m_Device read GetDevice;

    在delphi里面,这就是一个index属性的声明,可是,fpc里面,就会发生编译错误。

    后,参考fpc的语法,正确的index属性声明应为:

    property Device[AIndex:integer]: TDevice read GetDevice;

    修改后,编译一切顺利。

    记之。

    DelForExp 2.5.3 For 2010 修改版

    DelForExp 是delphi的一个自动格式化插件,可选择格式化当前编辑文件或者打开文件,甚至是整个工程文件。

    如下图:

    image

    image

    在使用了shadowstar codefast 后,深深的为其快速格式化当前文件的功能折服,因为经常都是写了一段代码后,才发现格式乱得一塌糊涂,快捷键一按,一切井井有条,多好。可惜,codefast一直都没发现有for 2010的版本。delforexp 终于有同志放出for 2010的版本,可是,每次格式化当前文件,都需要去打开菜单,然后显示对话框,然后选择格式化当前文件,实在是麻烦,因此做了修改:

    添加菜单:格式化当前文件

    添加快捷键:ctrl+alt+tab

    如同codefast,按快捷键即可迅速格式化当前文件。

    image 

    ps:暂时只for d2010,压缩包中的for其他版本为未修改版本。

    下载

    Delphi RAS拨号连接管理TDialUp v1.0

     图片如果打不开,说明流量不够了,请稍候下载……

    老外写的一个用来管理RAS拨号的控件。

    使用简单:

    创建一个TDialUp的实例,利用PossibleConnections可以获得系统当前的拨号连接列表。

    拨号例子:
      DialUp1.ConnectTO:=’宽带连接’;(上面获得在列表中在名称)
      DialUp1.GoOnline; //拨号在线
      dialup1.GoOffline; //断开

     

     

    ps:

    其实,这个控件存在于cnpack的控件包中,名称就是TCnDialUp,使用方法就是如上。

     

    盒子 – TDialUp v1.0 (RAS拨号连接管理)