MySqlTalk.com  

Go Back   MySqlTalk.com > MySQL > SQL syntax
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread
Old 01-18-2005, 01:44 PM   #1
Joel
Junior Member
 
Join Date: Dec 2004
Posts: 4 Joel is on a distinguished road
Invalid Use Of Null

Hi,

I have a field: Ship_To defined Varchar 6 Length. When I create the
record (.AddNew) I don't put any value in the field. When I read the field:
lblShipTo(intX).Caption = .Fields("Ship_To") I get an error "Invalid use of
Null". What am I doing wrong?
Joel is offline   Fork this post Reply With Quote
Old 01-18-2005, 02:47 PM   #2
Azkaban
Senior Member
 
Join Date: Jul 2004
Posts: 167 Azkaban is on a distinguished road
Re: Invalid Use Of Null

That field is probably marked as NOT NULL. Meaning you can put an empty space in it '' but not a NULL space which is different. If you need to have NULL values you'll need to change the field. Alternatively, when you enter data, just say '' instead of entering nothing in the field.
Azkaban is offline   Fork this post Reply With Quote
Old 01-18-2005, 03:05 PM   #3
Joel
Junior Member
 
Join Date: Dec 2004
Posts: 4 Joel is on a distinguished road
Re: Invalid Use Of Null

Azkaban, Thank You for responding. I'm using Navicat as the front end the last option by the field is allow null which I have checked. So does that me every time I create a record I have to assign a space (field="") to the field? That could be VERY cumbersome & error prone i.e. every time you add a field you'd have to modify your program to set the field to ""!
Joel is offline   Fork this post Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Will Paypal you $20 to write this one line select query Synpax General 4 02-16-2005 07:58 PM
fetching null values from a table. sameer78 Navicat Support 1 01-17-2005 09:27 AM
MYSQL-Reordering Problem JsS SQL syntax 14 11-09-2004 11:21 PM
Out of my depth johnmysql General 2 11-09-2004 10:33 AM
How do you set up a Date field to automatically put in the current date when NULL? MichaelPark General 12 10-21-2004 12:37 AM



All times are GMT -4. The time now is 06:59 AM.



Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Google
  Web http://www.mysqltalk.com
DISCLAIMERS:
1. We have no commercial interest in this site.
Banner Ads and Subscriptions will only be used to help pay for hosting and maintenance costs.
2. MySQLTalk.com is NOT affiliated with MySQL AB in any way.
3. MySQLTalk.com is NOT endorsed by MySQL AB in any way.
4. Please do not post any content that is harmful to MySQL or MySQL AB, meaning no misleading or obsolete information will be tolerated.
Well-founded constructive criticism meant to help the community is permitted.
5. This website is founded with the goal of improving the MySQL community.
We not only tolerate newbies, we encourage them.
Please do not ask newbies to "read the manual".