Re: Remove "Allow Null" property from column



Alex,

Your syntax looks correct to me - when you run the
"ALTER TABLE tableName ALTER COLUMN columnName NOT NULL"
command, what error do you get? A syntax error (Error Parsing Query) or
something else?

A stupid question - are there any null values in this column when you try to
run this command?

Finally - do you have any other constraints defined on this column?

Are you planning to synchronize this table with your central server? Is
dropping a recreating
the table in SQL CE an option for you?

--
Darren Shaffer
..NET Compact Framework MVP
Principal Architect
Connected Innovation
www.connectedinnovation.com


(303) 886-1932
"Alex Feldman" <alex-feldman@xxxxxxxxxxx> wrote in message
news:uq1yT$gOFHA.3560@xxxxxxxxxxxxxxxxxxxxxxx
> Does anyone know the sql command (or any other programmatic way) of
> removing the "Allow Null" property from a sql server ce column? This
> column needs to be a primary key for my table but I need to remove the
> "Allow Null" property (it is there in the central database by wrongful
> design, but it's too late for me to remove it from the central
> database).
>
> I've tried the
> "ALTER TABLE tableName ALTER COLUMN columnName NOT NULL" but it failed,
> as well as other attempts.
>
> Thanks.
>
> Alex
>
> p.s. for those following my previous thread about slow table querying,
> it appears that I really do need this feature....for another table in my
> database :-(
>
> *** Sent via Developersdex http://www.developersdex.com ***


.



Relevant Pages

  • Re: Setting Default value
    ... CurrentProject.Connection.Execute "ALTER TABLE tableName ALTER COLUMN ... columnName SET DEFAULT newDefaultValue" ... It is a command where you need ADO ... from employee to employee. ...
    (microsoft.public.access.modulesdaovba)
  • Re: SQL WHERE Command Help [C# Win]
    ... //Initialize SQL SELECT command to retrieve data ... //This Syntax works, but opens your program up too Syntax Attacks "sql ... //Open Connection to DataBase ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Sybase Data Load Question
    ... Can somebody please tell me what the command and syntax is for loading ... a text file into a database? ...
    (comp.databases.sybase)
  • Re: mysql-4.0.13 irix..
    ... > That command doesn't work on my linux version any better... ... > of the syntax? ... you can also try to create database with different character set: ...
    (comp.sys.sgi.admin)
  • Re: yp command to print all server settings
    ... > information from the YP database. ... > display. ... I can't remember the command. ... > provide the syntax also? ...
    (comp.os.linux.networking)