473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

AddNew Fails when too many fields are added

Hi,

I have a table with 90 fields. When I try to use the recordset with
addnew and set all the 90 fields and then update the record set it
fails the following error seen in the log,

[IBM][CLI Driver][DB2] SQL0117N The number of values assigned is not
the same as the number of specified or implied columns.
SQLSTATE=42802

But I'm able to set 40 fields and insert the record successfully. But
I'm able to update the table with all the 90 fields.

Is there any restriction with the recordset to insert maximum number
of fields or problem with the database (Using DB2 on Mainframes)

Can some one help me?

Thanks in Advance !

-Baskar
Nov 12 '05 #1
2 5166
Hi,

Some databases have a limit on a total length of the data, passed in one
record. For example, in a case of SQL Server you could have up to 1024
columns in a table, but the maximum number of bytes per row is 8,060. Also
some providers have limitations on a number of columns used in statements. I
think this is your case.

--
Val Mazur
Microsoft MVP
"baskar" <cb******@yahoo.co.in> wrote in message
news:b5**************************@posting.google.c om...
Hi,

I have a table with 90 fields. When I try to use the recordset with
addnew and set all the 90 fields and then update the record set it
fails the following error seen in the log,

[IBM][CLI Driver][DB2] SQL0117N The number of values assigned is not
the same as the number of specified or implied columns.
SQLSTATE=42802

But I'm able to set 40 fields and insert the record successfully. But
I'm able to update the table with all the 90 fields.

Is there any restriction with the recordset to insert maximum number
of fields or problem with the database (Using DB2 on Mainframes)

Can some one help me?

Thanks in Advance !

-Baskar

Nov 12 '05 #2
"Val Mazur" <gr******@hotmail.com> wrote in message news:<eH**************@TK2MSFTNGP09.phx.gbl>...
Hi,

Some databases have a limit on a total length of the data, passed in one
record. For example, in a case of SQL Server you could have up to 1024
columns in a table, but the maximum number of bytes per row is 8,060. Also
some providers have limitations on a number of columns used in statements. I
think this is your case.

--
Val Mazur
Microsoft MVP
"baskar" <cb******@yahoo.co.in> wrote in message
news:b5**************************@posting.google.c om...
Hi,

I have a table with 90 fields. When I try to use the recordset with
addnew and set all the 90 fields and then update the record set it
fails the following error seen in the log,

[IBM][CLI Driver][DB2] SQL0117N The number of values assigned is not
the same as the number of specified or implied columns.
SQLSTATE=42802

But I'm able to set 40 fields and insert the record successfully. But
I'm able to update the table with all the 90 fields.

Is there any restriction with the recordset to insert maximum number
of fields or problem with the database (Using DB2 on Mainframes)

Can some one help me?

Thanks in Advance !

-Baskar

Baskar,

DB2 allows 1012 columns/fields to be added. Is there a possiblity that
your record has lesser number of fields you are inserting than what is
in the table structure as is implied in the error message?
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Marshall | last post by:
ODBC situation, Access 97, here is the code and I've marked where Access coughs up. The Access error message is 3027, can't update, database is read only. The Oracle table in question has a...
25
by: dixie | last post by:
I have some code that adds new records into a table for each ID in a list box when a button on a form is clicked. This works fine. My problem now is that I wish to be able to edit all the records...
3
by: Steve Yerkes | last post by:
There seems to be way too much confusion over how to set focus on the a field using a field validator. I looked all over the web and found people trying to do this, but not getting anywhere. There...
5
by: Mika M | last post by:
Hello! I have Windows Forms application form containing TextBoxes, six ComboBoxes, and DataGrid for details. I have created DataSet with needed tables, and created relations between tables, and...
6
by: Aaron Smith | last post by:
I have a form, oddly enough the same one with the expression column that is giving me a headache, and on this form I have a dataset that has a couple of tables in it that are related. If I do a...
2
by: andraandjeff | last post by:
Hi everyone, I've got an ADO AddNew update query in VBA. Some of the fields may be empty and I want to know if there is an easier way than writing If statements around each field to test for...
9
bhcob1
by: bhcob1 | last post by:
Hey guys, 'Update or CancelUpdate without AddNew or Edit' On my database i keep occasionly get this error when i try and edit a field, it is not everytime. It will be working fine and then this...
1
by: puafo | last post by:
The following is the code I am using for the addnew and the select clause: <%Option Explicit%> <% IF session("sessionID") = "" THEN Response.Redirect "adminLogin.asp" END IF %> <%
10
by: fniles | last post by:
In VB6 to add a new record in a recorset, you can use the Addnew method, then set each column's value, then call the Update method. How can I do this in VB.NET ? Thank you. VB6: Private m_rs...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.