SQL Server gets error text information

Source: Internet
Author: User

SQL Server gets error text information, BDE, Adoquery has not been taken, Fdquery can

Some DBMS, like SQL Server, return messages as an additional result set. So, to-process messages, the application needs to process multiple result sets. Here's a more complex example, providing status and messages for SQL Server. As you see, we is using tfdmemtable to store result sets with rows.

var i:Integer;Begin FDConnection1.Resourceoptions.Serveroutput:=True; FDQuery1.FetchOptions.AutoClose:=False; FDQuery1.Open(' SELECT * from region; print '' Hello '‘‘); FDMemTable1.Data:= FDQuery1.Data; Memo1.Lines.Add(Format('%d rows processed ',[FDMemTable1.RecordCount])); FDQuery1.NextRecordsetif fdconnection1. Messages <> nil then for i := 0 to fdconnection1. Messages. Errorcount -1 do memo1. Lines. Add (Fdconnection1. Messages[i]. Message ; End               

SQL Server gets error text information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.