UniConnection SQL Server translate SQL statment

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
bn1978
Posts: 1
Joined: Fri 02 Nov 2012 12:19

UniConnection SQL Server translate SQL statment

Post by bn1978 » Fri 02 Nov 2012 12:32

Hello
I try execute this statement
12:22:52 CREATE TABLE AddrLabels ("Name" VARCHAR(35) NULL, "Addr1" VARCHAR(35) NULL, "Addr2" VARCHAR(35) NULL, "City" VARCHAR(35) NULL, "State" VARCHAR(2) NULL, "Zip" VARCHAR(10) NULL, "User" VARCHAR(12) NULL, "DateAdded" DATETIME NULL)

from this code
try
SQLServerConnection.ExecSQL(SQL,[]);
except on E: Exception do
ErrorMsg(E.Message);
end;
and have this error
12:22:53 Incorrect syntax near the keyword 'User'.
SQL profiler show me next statement
CREATE TABLE AddrLabels ([Name] VARCHAR(35) NULL, [Addr1] VARCHAR(35) NULL, [Addr2] VARCHAR(35) NULL, [City] VARCHAR(35) NULL, [State] VARCHAR(2) NULL, [Zip] VARCHAR(10) NULL, [User] VARCHAR(12) NULL, [DateAdded] DATETIME NULL)
can I tune connection, execute statement without [] brackets ?

Win7 64 UniDac 4.1.4 Rad Studio XE2
Thanks

AndreyZ

Re: UniConnection SQL Server translate SQL statment

Post by AndreyZ » Fri 02 Nov 2012 13:33

Hello,

I have executed the following code:

Code: Select all

UniConnection1.ExecSQL('CREATE TABLE AddrLabels ("Name" VARCHAR(35) NULL, "Addr1" VARCHAR(35) NULL, "Addr2" VARCHAR(35) NULL, "City" VARCHAR(35) NULL, "State" VARCHAR(2) NULL, "Zip" VARCHAR(10) NULL, "User" VARCHAR(12) NULL, "DateAdded" DATETIME NULL)', []);
, and there were no problems. Please try using the latest UniDAC version 4.5.9 and check if the problem persists. If it does, please specify the exact version of SQL Server you are using. You can learn it from the Info sheet of TUniConnection Editor.

Post Reply