Sunday, February 12, 2012

Cant 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.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.|||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|||Do you have insert statements for the record you inserted and the one you are attempting to insert?|||Hello and Thank you
I'm not sure what you mean by "insert statement"|||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?|||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.|||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!!

No comments:

Post a Comment