471,073 Members | 1,171 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Simple 'NULL' / Databiding prob got me stumped..

Ok, I'm new at this and learning as I go, but under extreme pressure
from work.. So many bugs and little tricky obsticals have got me very
far behind, and this is the latest..

I made a simple databinding form, but not using the wizard, because it
doesn't use the SQL driver.

I'm keeping it simple right now with a very normal table with a
primary key 'SIN' (social insurance number). Well I'm following
along in the book to do the whole goto next record, delete etc.. All
works.. But the problem is ADDING a record. Whenever I try, it simply
says "column 'SIN' does not allow nulls". Well no $#1T. I have a
value in the field, but it simply erases it right away and gives me
that message. I've been searching for DAYS on this, and nobody has
seemed to have it figured out in this scenario. It seems to me like
an extremly common issue..So why all the headache? None of the books
examples seem to deal with this....

btw, I've tried:
setting a default value on the SQL table itself.
changing the xml schema to not allow nulls.
changing the xml schema to assign a default value.
Nov 21 '05 #1
1 977
James,

When you add the row, do you than something like this
dim dr as datarow = table.newrow
dr("SIN") = x
and that should be done when it is not an autokey before the
table.add(dr)

In this case this construction does not work and gives errors
table.rows.add(table.newrow)

I think "cma.newrow" as well (I never tried it, because I do not take a
field like a Security number as primary key but let a seperated autokey as
primary key run). However the way I showed above should probably overcome
your problem.

I hope this helps?

Cor
Ok, I'm new at this and learning as I go, but under extreme pressure
from work.. So many bugs and little tricky obsticals have got me very
far behind, and this is the latest..

I made a simple databinding form, but not using the wizard, because it
doesn't use the SQL driver.

I'm keeping it simple right now with a very normal table with a
primary key 'SIN' (social insurance number). Well I'm following
along in the book to do the whole goto next record, delete etc.. All
works.. But the problem is ADDING a record. Whenever I try, it simply
says "column 'SIN' does not allow nulls". Well no $#1T. I have a
value in the field, but it simply erases it right away and gives me
that message. I've been searching for DAYS on this, and nobody has
seemed to have it figured out in this scenario. It seems to me like
an extremly common issue..So why all the headache? None of the books
examples seem to deal with this....

btw, I've tried:
setting a default value on the SQL table itself.
changing the xml schema to not allow nulls.
changing the xml schema to assign a default value.

Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by David Sobey | last post: by
6 posts views Thread by Dishan Fernando | last post: by
5 posts views Thread by Daniel | last post: by
4 posts views Thread by Armand | last post: by
2 posts views Thread by PokerMan | last post: by
reply views Thread by Greg Corradini | last post: by
reply views Thread by leo001 | last post: by

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.