alter table

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
m_alvanchi
Posts: 2
Joined: Thu 03 Feb 2011 16:51

alter table

Post by m_alvanchi » Thu 03 Feb 2011 17:08

hi
alter table test add name text(10) default null
when i used alter table in uniquery dispaly error.
how i used alter table with default value .
when i used alter table with out default value this code is true.
please help me
tanks

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 04 Feb 2011 08:01

Hello,

Please specify the following information so that I am able to help you:
- the exact version of UniDAC;
- the name and the version of your IDE;
- the name of your database;
- the script to create and alter the table.

m_alvanchi
Posts: 2
Joined: Thu 03 Feb 2011 16:51

alter table

Post by m_alvanchi » Sat 05 Feb 2011 05:38

hi
The version of UniDAC is :3.50.0.14 for RAD studio 2010
the name and the version of your IDE is :Embarcadero® RAD Studio 2010 Version 14.0.3615.26342 (Delphi 2010)
The name of my database is :sql server2010 and Microsoft Access
The script of alter table is:
UniQuery1.SQL.Text:='ALTER TABLE DP_Tab '+
' ADD nCas_num int default 0';
UniQuery1.Execute;

AndreyZ

Post by AndreyZ » Mon 07 Feb 2011 11:10

You can use this code when you are working with SQL Server. To make this code work with MS Access, you should enable support for extended SQL for MS Access by setting the UniConnection.SpecificOptions.ExtendedAnsiSQL option to 1.

Post Reply