Getting Delphi 7 to play with SQL Server Compact 3.5

后端 未结 2 948
别跟我提以往
别跟我提以往 2020-12-10 20:19

We have an old application that was written in Delphi 7. It is currently connected to an old Oracle Lite database that is being retired. The powers that be have chosen to

相关标签:
2条回答
  • 2020-12-10 20:31

    Don't use ExecSQL for queries that return recordsets.

    Set either the AdoQuery.Active property to True or use AdoQuery.Open to execute a SELECT statement.

    UPDATE

    After changing your code we see the real error which is DB_E_OBJECTOPEN.

    UPDATE2

    After digging deeper it seems that this is a known bug in the OLE DB provider and nvarchar fields bigger than 127 characters.

    these references seem to confirm this:

    SO: SQL Server Compact Edition 3.5 gives "Multiple-step operation generated errors" error for simple query

    ref1: http://www.tech-archive.net/Archive/SQL-Server/microsoft.public.sqlserver.ce/2008-07/msg00019.html

    ref2: https://forums.embarcadero.com/thread.jspa?messageID=474517

    ref3: http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/48815888-d4ee-42dd-b712-2168639e973c

    0 讨论(0)
  • 2020-12-10 20:42

    Changing the cursor type to server side solved the 127 char issue for me :)

    0 讨论(0)
提交回复
热议问题