Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: miserable problem


Message #1 by "sqlkid" <shyam@c...> on Sat, 22 Mar 2003 08:15:57
Hi there,

I have a wee problem with the INSERT statement.  The problem is very 
unusual. I would like yours help in the same. The problem is.... Mine 
files are running very well on my IIS but when i posted the same on net, 
it prompts me error messages. The error which it prompt is...
Microsoft OLE DB Provider for ODBC Drivers error '80040e14' 

[Microsoft][ODBC SQL Server Driver][SQL Server]Insert Error: Column name 
or number of supplied values does not match table definition. 

/minorities/postrec.asp, line 34 

In brief, i would like to put some lights on the code and database. It's a 
very simple program in which user fill up  their events details in the 
form and the vaules of that form is going to store in the database.The 
database contain one "AUTO-INCREMENT" fileds which is increment by 1 every 
times a new records is added. I am using SQL 2000 and ASP.

The snapshot of Insert statement is :

strsql="insert into recruitment values('"& Request("title") & "','"& 
Request("cname") & "' , '" _

& request("cdesc") &"' , '"& request("country") &"','"& request("state") 
&"' , '"& request("ind") &"' , '" _

& request("indother") &"' , '"& request("level") &"','"& request
("jobdesig") &"' , '"& request("jobfun") &"', '" _

& request("jobdesc") &"' , '"& request("currency") &"','"& request
("lsalary") &"' , '"& request("hsalary") &"', '" _

& request("chkperks") &"' , '"& request("rdohousing") &"','"& request
("numvac") &"' , '"& request("degree") &"', '" _

& request("workexp") &"','"& request("add_info") &"','"& request("email") 
&"', '"& request("sms") &"', '" _

& request("address1") &"', '"& request("address2") &"', '"& request
("pincode") &"','"& request("contry") &"', '" _ 

& request("constate") &"' , '"& request("city") &"','"& request("teloff") 
&"','"& request("telhome") &"','"& request("postaddress") &"')" 

set recordset = connection.execute(strsql)

I am very well aware what the error message means. But, both tables and 
files are same. One run fines on my IIS but other show the above mentions 
error.

What am I doing wrong? I suspect that it might be related to the 
autoincrement field. Or it might be that I just plain can't do this?


Any answers or suggestion( for debugging) are most welcome.
 
Thanks for your anticipations.
shyam 

Message #2 by Mark Eckeard <meckeard2000@y...> on Sat, 22 Mar 2003 05:04:13 -0800 (PST)
Did you response.write your values to ensure that the
fields are correct?

I noticed that you are not explicitly stating your
field names in your insert statement.  Maybe there is
some setting on your non-local SQL that states you
must?!?

Or maybe the value being posted doesn't match the name
of the field?

In any case, I believe it's best to specify your field
names.

Mark.
--- sqlkid <shyam@c...> wrote:
> Hi there,
> 
> I have a wee problem with the INSERT statement.  The
> problem is very 
> unusual. I would like yours help in the same. The
> problem is.... Mine 
> files are running very well on my IIS but when i
> posted the same on net, 
> it prompts me error messages. The error which it
> prompt is...
> Microsoft OLE DB Provider for ODBC Drivers error
> '80040e14' 
> 
> [Microsoft][ODBC SQL Server Driver][SQL
> Server]Insert Error: Column name 
> or number of supplied values does not match table
> definition. 
> 
> /minorities/postrec.asp, line 34 
> 
> In brief, i would like to put some lights on the
> code and database. It's a 
> very simple program in which user fill up  their
> events details in the 
> form and the vaules of that form is going to store
> in the database.The 
> database contain one "AUTO-INCREMENT" fileds which
> is increment by 1 every 
> times a new records is added. I am using SQL 2000
> and ASP.
> 
> The snapshot of Insert statement is :
> 
> strsql="insert into recruitment values('"&
> Request("title") & "','"& 
> Request("cname") & "' , '" _
> 
> & request("cdesc") &"' , '"& request("country")
> &"','"& request("state") 
> &"' , '"& request("ind") &"' , '" _
> 
> & request("indother") &"' , '"& request("level")
> &"','"& request
> ("jobdesig") &"' , '"& request("jobfun") &"', '" _
> 
> & request("jobdesc") &"' , '"& request("currency")
> &"','"& request
> ("lsalary") &"' , '"& request("hsalary") &"', '" _
> 
> & request("chkperks") &"' , '"&
> request("rdohousing") &"','"& request
> ("numvac") &"' , '"& request("degree") &"', '" _
> 
> & request("workexp") &"','"& request("add_info")
> &"','"& request("email") 
> &"', '"& request("sms") &"', '" _
> 
> & request("address1") &"', '"& request("address2")
> &"', '"& request
> ("pincode") &"','"& request("contry") &"', '" _ 
> 
> & request("constate") &"' , '"& request("city")
> &"','"& request("teloff") 
> &"','"& request("telhome") &"','"&
> request("postaddress") &"')" 
> 
> set recordset = connection.execute(strsql)
> 
> I am very well aware what the error message means.
> But, both tables and 
> files are same. One run fines on my IIS but other
> show the above mentions 
> error.
> 
> What am I doing wrong? I suspect that it might be
> related to the 
> autoincrement field. Or it might be that I just
> plain can't do this?
> 
> 
> Any answers or suggestion( for debugging) are most
> welcome.
>  
> Thanks for your anticipations.
> shyam 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
Message #3 by "shyam" <shyam@c...> on Sat, 22 Mar 2003 18:50:02 +0530
Hello Mark,
                     Thanks for your suggestions. When i supply the fields
explictly, i got this error message..

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL
into column 'recnum', table 'recruitment' ; column does not allow nulls.
INSERT fails.

/minorities/postrec.asp, line 35

But Mark, delimaa remain as it is. How it works well one place and on second
place, it show error ?.

Thanks for your suggestion

sqlkid

----- Original Message -----
From: "Mark Eckeard" <meckeard2000@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Saturday, March 22, 2003 6:34 PM
Subject: [asp_databases] Re: miserable problem


> Did you response.write your values to ensure that the
> fields are correct?
>
> I noticed that you are not explicitly stating your
> field names in your insert statement.  Maybe there is
> some setting on your non-local SQL that states you
> must?!?
>
> Or maybe the value being posted doesn't match the name
> of the field?
>
> In any case, I believe it's best to specify your field
> names.
>
> Mark.
> --- sqlkid <shyam@c...> wrote:
> > Hi there,
> >
> > I have a wee problem with the INSERT statement.  The
> > problem is very
> > unusual. I would like yours help in the same. The
> > problem is.... Mine
> > files are running very well on my IIS but when i
> > posted the same on net,
> > it prompts me error messages. The error which it
> > prompt is...
> > Microsoft OLE DB Provider for ODBC Drivers error
> > '80040e14'
> >
> > [Microsoft][ODBC SQL Server Driver][SQL
> > Server]Insert Error: Column name
> > or number of supplied values does not match table
> > definition.
> >
> > /minorities/postrec.asp, line 34
> >
> > In brief, i would like to put some lights on the
> > code and database. It's a
> > very simple program in which user fill up  their
> > events details in the
> > form and the vaules of that form is going to store
> > in the database.The
> > database contain one "AUTO-INCREMENT" fileds which
> > is increment by 1 every
> > times a new records is added. I am using SQL 2000
> > and ASP.
> >
> > The snapshot of Insert statement is :
> >
> > strsql="insert into recruitment values('"&
> > Request("title") & "','"&
> > Request("cname") & "' , '" _
> >
> > & request("cdesc") &"' , '"& request("country")
> > &"','"& request("state")
> > &"' , '"& request("ind") &"' , '" _
> >
> > & request("indother") &"' , '"& request("level")
> > &"','"& request
> > ("jobdesig") &"' , '"& request("jobfun") &"', '" _
> >
> > & request("jobdesc") &"' , '"& request("currency")
> > &"','"& request
> > ("lsalary") &"' , '"& request("hsalary") &"', '" _
> >
> > & request("chkperks") &"' , '"&
> > request("rdohousing") &"','"& request
> > ("numvac") &"' , '"& request("degree") &"', '" _
> >
> > & request("workexp") &"','"& request("add_info")
> > &"','"& request("email")
> > &"', '"& request("sms") &"', '" _
> >
> > & request("address1") &"', '"& request("address2")
> > &"', '"& request
> > ("pincode") &"','"& request("contry") &"', '" _
> >
> > & request("constate") &"' , '"& request("city")
> > &"','"& request("teloff")
> > &"','"& request("telhome") &"','"&
> > request("postaddress") &"')"
> >
> > set recordset = connection.execute(strsql)
> >
> > I am very well aware what the error message means.
> > But, both tables and
> > files are same. One run fines on my IIS but other
> > show the above mentions
> > error.
> >
> > What am I doing wrong? I suspect that it might be
> > related to the
> > autoincrement field. Or it might be that I just
> > plain can't do this?
> >
> >
> > Any answers or suggestion( for debugging) are most
> > welcome.
> >
> > Thanks for your anticipations.
> > shyam
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>
>

Message #4 by Mark Eckeard <meckeard2000@y...> on Sat, 22 Mar 2003 07:27:13 -0800 (PST)
Is the field 'recnum' the auto-incrementing field?

If it is, make sure the field is set to
auto-increment.  If it isn't and the field is set to
NOT accept a NULL value, you might get this error.

Mark.
--- shyam <shyam@c...> wrote:
> Hello Mark,
>                      Thanks for your suggestions.
> When i supply the fields
> explictly, i got this error message..
> 
> Microsoft OLE DB Provider for ODBC Drivers error
> '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL
> Server]Cannot insert the value NULL
> into column 'recnum', table 'recruitment' ; column
> does not allow nulls.
> INSERT fails.
> 
> /minorities/postrec.asp, line 35
> 
> But Mark, delimaa remain as it is. How it works well
> one place and on second
> place, it show error ?.
> 
> Thanks for your suggestion
> 
> sqlkid
> 
> ----- Original Message -----
> From: "Mark Eckeard" <meckeard2000@y...>
> To: "ASP Databases" <asp_databases@p...>
> Sent: Saturday, March 22, 2003 6:34 PM
> Subject: [asp_databases] Re: miserable problem
> 
> 
> > Did you response.write your values to ensure that
> the
> > fields are correct?
> >
> > I noticed that you are not explicitly stating your
> > field names in your insert statement.  Maybe there
> is
> > some setting on your non-local SQL that states you
> > must?!?
> >
> > Or maybe the value being posted doesn't match the
> name
> > of the field?
> >
> > In any case, I believe it's best to specify your
> field
> > names.
> >
> > Mark.
> > --- sqlkid <shyam@c...> wrote:
> > > Hi there,
> > >
> > > I have a wee problem with the INSERT statement. 
> The
> > > problem is very
> > > unusual. I would like yours help in the same.
> The
> > > problem is.... Mine
> > > files are running very well on my IIS but when i
> > > posted the same on net,
> > > it prompts me error messages. The error which it
> > > prompt is...
> > > Microsoft OLE DB Provider for ODBC Drivers error
> > > '80040e14'
> > >
> > > [Microsoft][ODBC SQL Server Driver][SQL
> > > Server]Insert Error: Column name
> > > or number of supplied values does not match
> table
> > > definition.
> > >
> > > /minorities/postrec.asp, line 34
> > >
> > > In brief, i would like to put some lights on the
> > > code and database. It's a
> > > very simple program in which user fill up  their
> > > events details in the
> > > form and the vaules of that form is going to
> store
> > > in the database.The
> > > database contain one "AUTO-INCREMENT" fileds
> which
> > > is increment by 1 every
> > > times a new records is added. I am using SQL
> 2000
> > > and ASP.
> > >
> > > The snapshot of Insert statement is :
> > >
> > > strsql="insert into recruitment values('"&
> > > Request("title") & "','"&
> > > Request("cname") & "' , '" _
> > >
> > > & request("cdesc") &"' , '"& request("country")
> > > &"','"& request("state")
> > > &"' , '"& request("ind") &"' , '" _
> > >
> > > & request("indother") &"' , '"& request("level")
> > > &"','"& request
> > > ("jobdesig") &"' , '"& request("jobfun") &"', '"
> _
> > >
> > > & request("jobdesc") &"' , '"&
> request("currency")
> > > &"','"& request
> > > ("lsalary") &"' , '"& request("hsalary") &"', '"
> _
> > >
> > > & request("chkperks") &"' , '"&
> > > request("rdohousing") &"','"& request
> > > ("numvac") &"' , '"& request("degree") &"', '" _
> > >
> > > & request("workexp") &"','"& request("add_info")
> > > &"','"& request("email")
> > > &"', '"& request("sms") &"', '" _
> > >
> > > & request("address1") &"', '"&
> request("address2")
> > > &"', '"& request
> > > ("pincode") &"','"& request("contry") &"', '" _
> > >
> > > & request("constate") &"' , '"& request("city")
> > > &"','"& request("teloff")
> > > &"','"& request("telhome") &"','"&
> > > request("postaddress") &"')"
> > >
> > > set recordset = connection.execute(strsql)
> > >
> > > I am very well aware what the error message
> means.
> > > But, both tables and
> > > files are same. One run fines on my IIS but
> other
> > > show the above mentions
> > > error.
> > >
> > > What am I doing wrong? I suspect that it might
> be
> > > related to the
> > > autoincrement field. Or it might be that I just
> > > plain can't do this?
> > >
> > >
> > > Any answers or suggestion( for debugging) are
> most
> > > welcome.
> > >
> > > Thanks for your anticipations.
> > > shyam
> > >
> >
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Platinum - Watch CBS' NCAA March Madness,
> live on your desktop!
> > http://platinum.yahoo.com
> >
> >
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
Message #5 by "shyam" <shyam@c...> on Sat, 22 Mar 2003 21:13:27 +0530
Hello Mark,
                      For your conivience, here is the table which i used.

BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
CREATE TABLE dbo.Tmp_recruitment
 (
 recnum bigint NOT NULL IDENTITY (1, 1) NOT FOR REPLICATION,
 title varchar(50) NOT NULL,
 cname varchar(50) NOT NULL,
 cdesc varchar(50) NOT NULL,
 country char(10) NOT NULL,
 state char(2) NOT NULL,
 ind char(6) NULL,
 indother varchar(50) NULL,
 clevel char(6) NULL,
 jobdesig varchar(50) NULL,
 jobfun char(6) NOT NULL,
 jobdesc varchar(250) NULL,
 currency char(6) NULL,
 lsalary char(10) NULL,
 hsalary char(10) NULL,
 chkperks char(6) NULL,
 housing char(6) NULL,
 numvac char(6) NULL,
 degree varchar(25) NULL,
 workexp char(10) NULL,
 addinfo varchar(200) NULL,
 email varchar(30) NULL,
 sms varchar(50) NULL,
 contadd1 varchar(30) NULL,
 contadd2 varchar(30) NULL,
 pincode char(10) NULL,
 contry char(6) NULL,
 constate char(6) NULL,
 city varchar(30) NULL,
 teloff char(10) NULL,
 telhome char(10) NULL,
 postadd varchar(250) NULL
 )  ON [PRIMARY]
GO
DECLARE @v sql_variant
SET @v = N'Titile of the recruitment add'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'title'
GO
DECLARE @v sql_variant
SET @v = N'comapny name'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'cname'
GO
DECLARE @v sql_variant
SET @v = N'Comapnay descriptions'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'cdesc'
GO
DECLARE @v sql_variant
SET @v = N'Company Locations country'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'country'
GO
DECLARE @v sql_variant
SET @v = N'Company Locations state'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'state'
GO
DECLARE @v sql_variant
SET @v = N'Indrustries name'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'ind'
GO
DECLARE @v sql_variant
SET @v = N'Other industries name'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'indother'
GO
DECLARE @v sql_variant
SET @v = N'Level of the Job'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'clevel'
GO
DECLARE @v sql_variant
SET @v = N'Designations of the job'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'jobdesig'
GO
DECLARE @v sql_variant
SET @v = N'Job functions'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'jobfun'
GO
DECLARE @v sql_variant
SET @v = N'currency means either in USD or in RS'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'currency'
GO
DECLARE @v sql_variant
SET @v = N'Startting salary'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'lsalary'
GO
DECLARE @v sql_variant
SET @v = N'Heighest salary'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'hsalary'
GO
DECLARE @v sql_variant
SET @v = N'cheks perks'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'chkperks'
GO
DECLARE @v sql_variant
SET @v = N'housing'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'housing'
GO
DECLARE @v sql_variant
SET @v = N'Number of vaccencies'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'numvac'
GO
DECLARE @v sql_variant
SET @v = N'Degree of the candidates'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'degree'
GO
DECLARE @v sql_variant
SET @v = N'Additional informations'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'addinfo'
GO
DECLARE @v sql_variant
SET @v = N'Email address of the contact lsit'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'email'
GO
DECLARE @v sql_variant
SET @v = N'cell number@s... provider.com'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'sms'
GO
DECLARE @v sql_variant
SET @v = N'contact address of the person'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'contadd1'
GO
DECLARE @v sql_variant
SET @v = N'pincode of the user'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'pincode'
GO
DECLARE @v sql_variant
SET @v = N'Contact user country '
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'contry'
GO
DECLARE @v sql_variant
SET @v = N'Contact address of user sate'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'constate'
GO
DECLARE @v sql_variant
SET @v = N'city of the contact person'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'city'
GO
DECLARE @v sql_variant
SET @v = N'Office telephone number'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'teloff'
GO
DECLARE @v sql_variant
SET @v = N' telephone home'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'telhome'
GO
DECLARE @v sql_variant
SET @v = N'postal address'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'user', N'dbo',
N'table', N'Tmp_recruitment', N'column', N'postadd'
GO
SET IDENTITY_INSERT dbo.Tmp_recruitment ON
GO
IF EXISTS(SELECT * FROM dbo.recruitment)
  EXEC('INSERT INTO dbo.Tmp_recruitment (recnum, title, cname, cdesc,
country, state, ind, indother, clevel, jobdesig, jobfun, jobdesc, currency,
lsalary, hsalary, chkperks, housing, numvac, degree, workexp, addinfo,
email, sms, contadd1, contadd2, pincode, contry, constate, city, teloff,
telhome, postadd)
  SELECT recnum, title, cname, cdesc, country, state, ind, indother, clevel,
jobdesig, jobfun, jobdesc, currency, lsalary, hsalary, chkperks, housing,
numvac, degree, workexp, addinfo, email, sms, contadd1, contadd2, pincode,
contry, constate, city, teloff, telhome, postadd FROM dbo.recruitment
TABLOCKX')
GO
SET IDENTITY_INSERT dbo.Tmp_recruitment OFF
GO
DROP TABLE dbo.recruitment
GO
EXECUTE sp_rename N'dbo.Tmp_recruitment', N'recruitment', 'OBJECT'
GO
ALTER TABLE dbo.recruitment ADD CONSTRAINT
 PK_recruitment PRIMARY KEY CLUSTERED
 (
 recnum
 ) ON [PRIMARY]

GO
COMMIT
.
shyam


----- Original Message -----
From: "Mark Eckeard" <meckeard2000@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Saturday, March 22, 2003 8:57 PM
Subject: [asp_databases] Re: miserable problem


> Is the field 'recnum' the auto-incrementing field?
>
> If it is, make sure the field is set to
> auto-increment.  If it isn't and the field is set to
> NOT accept a NULL value, you might get this error.
>
> Mark.
> --- shyam <shyam@c...> wrote:
> > Hello Mark,
> >                      Thanks for your suggestions.
> > When i supply the fields
> > explictly, i got this error message..
> >
> > Microsoft OLE DB Provider for ODBC Drivers error
> > '80040e14'
> > [Microsoft][ODBC SQL Server Driver][SQL
> > Server]Cannot insert the value NULL
> > into column 'recnum', table 'recruitment' ; column
> > does not allow nulls.
> > INSERT fails.
> >
> > /minorities/postrec.asp, line 35
> >
> > But Mark, delimaa remain as it is. How it works well
> > one place and on second
> > place, it show error ?.
> >
> > Thanks for your suggestion
> >
> > sqlkid
> >
> > ----- Original Message -----
> > From: "Mark Eckeard" <meckeard2000@y...>
> > To: "ASP Databases" <asp_databases@p...>
> > Sent: Saturday, March 22, 2003 6:34 PM
> > Subject: [asp_databases] Re: miserable problem
> >
> >
> > > Did you response.write your values to ensure that
> > the
> > > fields are correct?
> > >
> > > I noticed that you are not explicitly stating your
> > > field names in your insert statement.  Maybe there
> > is
> > > some setting on your non-local SQL that states you
> > > must?!?
> > >
> > > Or maybe the value being posted doesn't match the
> > name
> > > of the field?
> > >
> > > In any case, I believe it's best to specify your
> > field
> > > names.
> > >
> > > Mark.
> > > --- sqlkid <shyam@c...> wrote:
> > > > Hi there,
> > > >
> > > > I have a wee problem with the INSERT statement.
> > The
> > > > problem is very
> > > > unusual. I would like yours help in the same.
> > The
> > > > problem is.... Mine
> > > > files are running very well on my IIS but when i
> > > > posted the same on net,
> > > > it prompts me error messages. The error which it
> > > > prompt is...
> > > > Microsoft OLE DB Provider for ODBC Drivers error
> > > > '80040e14'
> > > >
> > > > [Microsoft][ODBC SQL Server Driver][SQL
> > > > Server]Insert Error: Column name
> > > > or number of supplied values does not match
> > table
> > > > definition.
> > > >
> > > > /minorities/postrec.asp, line 34
> > > >
> > > > In brief, i would like to put some lights on the
> > > > code and database. It's a
> > > > very simple program in which user fill up  their
> > > > events details in the
> > > > form and the vaules of that form is going to
> > store
> > > > in the database.The
> > > > database contain one "AUTO-INCREMENT" fileds
> > which
> > > > is increment by 1 every
> > > > times a new records is added. I am using SQL
> > 2000
> > > > and ASP.
> > > >
> > > > The snapshot of Insert statement is :
> > > >
> > > > strsql="insert into recruitment values('"&
> > > > Request("title") & "','"&
> > > > Request("cname") & "' , '" _
> > > >
> > > > & request("cdesc") &"' , '"& request("country")
> > > > &"','"& request("state")
> > > > &"' , '"& request("ind") &"' , '" _
> > > >
> > > > & request("indother") &"' , '"& request("level")
> > > > &"','"& request
> > > > ("jobdesig") &"' , '"& request("jobfun") &"', '"
> > _
> > > >
> > > > & request("jobdesc") &"' , '"&
> > request("currency")
> > > > &"','"& request
> > > > ("lsalary") &"' , '"& request("hsalary") &"', '"
> > _
> > > >
> > > > & request("chkperks") &"' , '"&
> > > > request("rdohousing") &"','"& request
> > > > ("numvac") &"' , '"& request("degree") &"', '" _
> > > >
> > > > & request("workexp") &"','"& request("add_info")
> > > > &"','"& request("email")
> > > > &"', '"& request("sms") &"', '" _
> > > >
> > > > & request("address1") &"', '"&
> > request("address2")
> > > > &"', '"& request
> > > > ("pincode") &"','"& request("contry") &"', '" _
> > > >
> > > > & request("constate") &"' , '"& request("city")
> > > > &"','"& request("teloff")
> > > > &"','"& request("telhome") &"','"&
> > > > request("postaddress") &"')"
> > > >
> > > > set recordset = connection.execute(strsql)
> > > >
> > > > I am very well aware what the error message
> > means.
> > > > But, both tables and
> > > > files are same. One run fines on my IIS but
> > other
> > > > show the above mentions
> > > > error.
> > > >
> > > > What am I doing wrong? I suspect that it might
> > be
> > > > related to the
> > > > autoincrement field. Or it might be that I just
> > > > plain can't do this?
> > > >
> > > >
> > > > Any answers or suggestion( for debugging) are
> > most
> > > > welcome.
> > > >
> > > > Thanks for your anticipations.
> > > > shyam
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Platinum - Watch CBS' NCAA March Madness,
> > live on your desktop!
> > > http://platinum.yahoo.com
> > >
> > >
> >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>
>

Message #6 by "shyam" <shyam@c...> on Tue, 25 Mar 2003 10:36:51 +0530
Hello Mark,
                     Thanks for your suggestions. When i supply the fields
explictly, i got this error message..

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value NULL
into column 'recnum', table 'recruitment' ; column does not allow nulls.
INSERT fails.

/minorities/postrec.asp, line 35

But Mark, delimaa remain as it is. How it works well one place and on second
place, it show error ?.

Thanks for your suggestion

sqlkid

----- Original Message -----
From: "Mark Eckeard" <meckeard2000@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Saturday, March 22, 2003 8:57 PM
Subject: [asp_databases] Re: miserable problem


> Is the field 'recnum' the auto-incrementing field?
>
> If it is, make sure the field is set to
> auto-increment.  If it isn't and the field is set to
> NOT accept a NULL value, you might get this error.
>
> Mark.
> --- shyam <shyam@c...> wrote:
> > Hello Mark,
> >                      Thanks for your suggestions.
> > When i supply the fields
> > explictly, i got this error message..
> >
> > Microsoft OLE DB Provider for ODBC Drivers error
> > '80040e14'
> > [Microsoft][ODBC SQL Server Driver][SQL
> > Server]Cannot insert the value NULL
> > into column 'recnum', table 'recruitment' ; column
> > does not allow nulls.
> > INSERT fails.
> >
> > /minorities/postrec.asp, line 35
> >
> > But Mark, delimaa remain as it is. How it works well
> > one place and on second
> > place, it show error ?.
> >
> > Thanks for your suggestion
> >
> > sqlkid
> >
> > ----- Original Message -----
> > From: "Mark Eckeard" <meckeard2000@y...>
> > To: "ASP Databases" <asp_databases@p...>
> > Sent: Saturday, March 22, 2003 6:34 PM
> > Subject: [asp_databases] Re: miserable problem
> >
> >
> > > Did you response.write your values to ensure that
> > the
> > > fields are correct?
> > >
> > > I noticed that you are not explicitly stating your
> > > field names in your insert statement.  Maybe there
> > is
> > > some setting on your non-local SQL that states you
> > > must?!?
> > >
> > > Or maybe the value being posted doesn't match the
> > name
> > > of the field?
> > >
> > > In any case, I believe it's best to specify your
> > field
> > > names.
> > >
> > > Mark.
> > > --- sqlkid <shyam@c...> wrote:
> > > > Hi there,
> > > >
> > > > I have a wee problem with the INSERT statement.
> > The
> > > > problem is very
> > > > unusual. I would like yours help in the same.
> > The
> > > > problem is.... Mine
> > > > files are running very well on my IIS but when i
> > > > posted the same on net,
> > > > it prompts me error messages. The error which it
> > > > prompt is...
> > > > Microsoft OLE DB Provider for ODBC Drivers error
> > > > '80040e14'
> > > >
> > > > [Microsoft][ODBC SQL Server Driver][SQL
> > > > Server]Insert Error: Column name
> > > > or number of supplied values does not match
> > table
> > > > definition.
> > > >
> > > > /minorities/postrec.asp, line 34
> > > >
> > > > In brief, i would like to put some lights on the
> > > > code and database. It's a
> > > > very simple program in which user fill up  their
> > > > events details in the
> > > > form and the vaules of that form is going to
> > store
> > > > in the database.The
> > > > database contain one "AUTO-INCREMENT" fileds
> > which
> > > > is increment by 1 every
> > > > times a new records is added. I am using SQL
> > 2000
> > > > and ASP.
> > > >
> > > > The snapshot of Insert statement is :
> > > >
> > > > strsql="insert into recruitment values('"&
> > > > Request("title") & "','"&
> > > > Request("cname") & "' , '" _
> > > >
> > > > & request("cdesc") &"' , '"& request("country")
> > > > &"','"& request("state")
> > > > &"' , '"& request("ind") &"' , '" _
> > > >
> > > > & request("indother") &"' , '"& request("level")
> > > > &"','"& request
> > > > ("jobdesig") &"' , '"& request("jobfun") &"', '"
> > _
> > > >
> > > > & request("jobdesc") &"' , '"&
> > request("currency")
> > > > &"','"& request
> > > > ("lsalary") &"' , '"& request("hsalary") &"', '"
> > _
> > > >
> > > > & request("chkperks") &"' , '"&
> > > > request("rdohousing") &"','"& request
> > > > ("numvac") &"' , '"& request("degree") &"', '" _
> > > >
> > > > & request("workexp") &"','"& request("add_info")
> > > > &"','"& request("email")
> > > > &"', '"& request("sms") &"', '" _
> > > >
> > > > & request("address1") &"', '"&
> > request("address2")
> > > > &"', '"& request
> > > > ("pincode") &"','"& request("contry") &"', '" _
> > > >
> > > > & request("constate") &"' , '"& request("city")
> > > > &"','"& request("teloff")
> > > > &"','"& request("telhome") &"','"&
> > > > request("postaddress") &"')"
> > > >
> > > > set recordset = connection.execute(strsql)
> > > >
> > > > I am very well aware what the error message
> > means.
> > > > But, both tables and
> > > > files are same. One run fines on my IIS but
> > other
> > > > show the above mentions
> > > > error.
> > > >
> > > > What am I doing wrong? I suspect that it might
> > be
> > > > related to the
> > > > autoincrement field. Or it might be that I just
> > > > plain can't do this?
> > > >
> > > >
> > > > Any answers or suggestion( for debugging) are
> > most
> > > > welcome.
> > > >
> > > > Thanks for your anticipations.
> > > > shyam
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Platinum - Watch CBS' NCAA March Madness,
> > live on your desktop!
> > > http://platinum.yahoo.com
> > >
> > >
> >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> http://platinum.yahoo.com
>
>


  Return to Index