It will not allow me to save if i will leave the EmployeeName Column empty


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: It will not allow me to save if i will leave the EmployeeName Column empty

  1. #1
    reggie Guest

    It will not allow me to save if i will leave the EmployeeName Column empty


    These are my settings on my on my Delphi 6
    1. I am using dbexpress components(SQLConnection,SQLTable and SQLClientDataset)
    2. I am using DataAccess components(Datasource, Datasetprovider and ClientDataSet)

    These are my settings on my SQL Server 2000
    1. Employeename column i set it as varchar Data type and it will allow nulls.
    2. HiredDate column i set it as smalldatetime data type and it will allow
    nulls.

    These are the problems.
    1. If i entered a record it will save it.
    2 If i delete the name of the employee and leave it blank it will not allow
    me to delete or leave the employeename to be blank, it will not save it.
    But if i will just leave one character in the column of employeename it will
    allow me to save it. I noticed that if my data type in sqlserver is varchar
    and i tried different data types. The problem will occur.
    3. It's different from hireddate column, i can leave the hired date column
    empty after the changes and it will save. I also noticed if my datatypes
    in sqlserver as smalldatetime there will be no problem.
    4. I found out after deleting the name under the employeename column i have
    to hit the space bar and hit the enter key and click the update button and
    this will save it. But there should be another way to save it. Your help
    is very much appreciated. Thanks.

    Reggie


  2. #2
    Q*bert Guest

    Re: It will not allow me to save if i will leave the EmployeeName Column empty



    EmployeeName isn't an Identity colum is it?
    If it is, only once instance of NULL would be allowed...

    Q*bert

    "reggie" <reggie@silenttype.com> wrote:
    >
    >These are my settings on my on my Delphi 6
    >1. I am using dbexpress components(SQLConnection,SQLTable and SQLClientDataset)
    >2. I am using DataAccess components(Datasource, Datasetprovider and ClientDataSet)
    >
    >These are my settings on my SQL Server 2000
    >1. Employeename column i set it as varchar Data type and it will allow nulls.
    >2. HiredDate column i set it as smalldatetime data type and it will allow
    >nulls.
    >
    >These are the problems.
    >1. If i entered a record it will save it.
    >2 If i delete the name of the employee and leave it blank it will not allow
    >me to delete or leave the employeename to be blank, it will not save it.
    >But if i will just leave one character in the column of employeename it

    will
    >allow me to save it. I noticed that if my data type in sqlserver is varchar
    >and i tried different data types. The problem will occur.
    >3. It's different from hireddate column, i can leave the hired date column
    >empty after the changes and it will save. I also noticed if my datatypes
    >in sqlserver as smalldatetime there will be no problem.
    >4. I found out after deleting the name under the employeename column i have
    >to hit the space bar and hit the enter key and click the update button and
    >this will save it. But there should be another way to save it. Your help
    >is very much appreciated. Thanks.
    >
    >Reggie
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center