default value wich is not in DDL.

default value wich is not in DDL.

am 12.04.2008 10:13:58 von lopina

Hello!!!!



I trying to put Null default value wich is not in DDL.

Because when user not select value from DDL that records not saved in SQL
base.

I hope You understand what I mean



best regards

lop

Re: default value wich is not in DDL.

am 12.04.2008 10:51:46 von Erland Sommarskog

lopina (ivica.lopar@email.t-com.hr) writes:
> I trying to put Null default value wich is not in DDL.
>
> Because when user not select value from DDL that records not saved in SQL
> base.
>
> I hope You understand what I mean

I'm afraid I don't really get your problem. This is legal:

create table ferenc (a int NULL DEFAULT NULL)

Then again, even without an explicit default value of NULL, NULL will be
the default for a nullable column.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx

Re: default value wich is not in DDL.

am 12.04.2008 14:03:54 von lopina

Hello!!!

I made table 1 in SQL with this values (1, 2, 3, 4, 5).
In web deweloper I made form with dropdownlist1 and in menu of that
dropdownlist i have values from table1.

Sometimes user doesnt have to choose values from ddl1, in that case other
values from Form1 are not saved in SQL database.

I hope You understand me now.

best regards
lopina



"Erland Sommarskog" wrote in message
news:Xns9A7E705A3B2CYazorman@127.0.0.1...
> lopina (ivica.lopar@email.t-com.hr) writes:
>> I trying to put Null default value wich is not in DDL.
>>
>> Because when user not select value from DDL that records not saved in
>> SQL
>> base.
>>
>> I hope You understand what I mean
>
> I'm afraid I don't really get your problem. This is legal:
>
> create table ferenc (a int NULL DEFAULT NULL)
>
> Then again, even without an explicit default value of NULL, NULL will be
> the default for a nullable column.
>
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx

Re: default value wich is not in DDL.

am 13.04.2008 03:52:53 von Erland Sommarskog

lopina (ivica.lopar@email.t-com.hr) writes:
> I made table 1 in SQL with this values (1, 2, 3, 4, 5).
> In web deweloper I made form with dropdownlist1 and in menu of that
> dropdownlist i have values from table1.
>
> Sometimes user doesnt have to choose values from ddl1, in that case other
> values from Form1 are not saved in SQL database.
>
> I hope You understand me now.

I don't know Visual Web Developer, and you may better off asking in a
newsgroup that deals with Visual Web Developer.

So with DDL you meant "Dropdownlist"? That is quite confusing, because
in the SQL world, DDL stands for Data Definition Language, that is the
statements you use to create tables.

When you say "I made table 1 in SQL with this values (1, 2, 3, 4, 5)",
I have very little idea what you mean, because you don't create tables
by giving values. Probably you are using some designer that I have no
idea what it's doing. So a forum for Visual Web Developer may be a better
place to ask. They may understand what you are doing.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downlo ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books .mspx