Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2005
    Posts
    9

    Unanswered: Can't insert new record to database.

    SOS
    I am working with SQL 2000 located on a Networksolutions server and I have a Test record I inserted manually, but I am unable to insert a new record and get this error "can't insert new record to database".
    No doubt this is a no brainer, but I can't solve it.
    Many Thanks
    Who ever you are.

  2. #2
    Join Date
    Nov 2005
    Location
    San Francisco, CA
    Posts
    506
    Quote Originally Posted by septemberq
    SOS
    I am working with SQL 2000 located on a Networksolutions server and I have a Test record I inserted manually, but I am unable to insert a new record and get this error "can't insert new record to database".
    No doubt this is a no brainer, but I can't solve it.
    Many Thanks
    Who ever you are.
    Its too little info,plz provide more.This can occur due to lots of reason.
    Success is the ability to go from one failure to another with no loss of enthusiasm.
    - Sir Winston Churchill
    Joydeep

  3. #3
    Join Date
    Dec 2005
    Posts
    9

    Can't insert nerw record to database

    The Table was manually created in Enterprise Manager.
    This is the Script :
    = = =
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tblProfile]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[tblProfile]
    GO

    CREATE TABLE [dbo].[tblProfile] (
    [ID] [int] IDENTITY (1, 1) NOT NULL ,
    [Password] [varchar] (50) COLLATE Latin1_General_CI_AS NOT NULL ,
    [FirstName] [varchar] (50) COLLATE Latin1_General_CI_AS NOT NULL ,
    [LastName] [varchar] (50) COLLATE Latin1_General_CI_AS NOT NULL ,
    [ZipCode] [varchar] (10) COLLATE Latin1_General_CI_AS NOT NULL ,
    [Email] [varchar] (100) COLLATE Latin1_General_CI_AS NOT NULL ,
    [Digit9] [varchar] (9) COLLATE Latin1_General_CI_AS NOT NULL ,
    [Digit81] [varchar] (2) COLLATE Latin1_General_CI_AS NOT NULL ,
    [Digit16] [varchar] (2) COLLATE Latin1_General_CI_AS NOT NULL ,
    [StateAffiliation] [varchar] (9) COLLATE Latin1_General_CI_AS NOT NULL ,
    [DateCreated] [datetime] NOT NULL ,
    [DateUpdated] [datetime] NOT NULL
    ) ON [PRIMARY]
    GO
    The Connection String has been tested and is OK.
    ===
    Thank you for your response

  4. #4
    Join Date
    Feb 2005
    Posts
    78
    Do you have insert statements for the record you inserted and the one you are attempting to insert?

  5. #5
    Join Date
    Dec 2005
    Posts
    9

    Can't insert new record in database

    Hello and Thank you
    I'm not sure what you mean by "insert statement"

  6. #6
    Join Date
    Feb 2005
    Posts
    78
    Let me make sure we are talking about the same thing. You have created the table that is scripted above. Now you are attempting to add data to this table by typing it into the table in enterprise manager. Is this correct?

  7. #7
    Join Date
    Dec 2005
    Posts
    9

    Can't insert new record to database.

    No.
    The Table is for a Registration form.
    Can't insert new record to database is the Error Message I get when I try to register a new user.
    Sorry I was not clear.

  8. #8
    Join Date
    Feb 2005
    Posts
    78
    OK, as rudra said, could be lots of things. Here's my first suggestion, maybe the form is trying to put a value in the [ID] field.

    Another thing, does the form retrieve data from the table before trying to write to it so you know it is not a security problem?

    Is there any way you can display the output of the form before it sends it to the database. This sort of problem can be really hard to diagnose from a distance!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •