473,395 Members | 2,713 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,395 software developers and data experts.

Blank date

I am trying to add records to a table with a date field (access-database)
where some of the records have a date and some haven't.
I use
dim dteReturDate as Date
If IsDate(RsMem("Returdato").Value) Then
dteReturdato = RsMem("Returdato").Value
Else
dteReturdato = Null
End If
..addnew
RsMem2.AddNew
RsMem2!Returdato = dteReturdato
..Update

Problem is the Null and the debugging stops at the RsMem2!Returdato-line
regards
reidarT
Nov 21 '05 #1
2 1229
Reidar,

This is an adodb question.

There is a small however active newsgroups where at least Paul and Bill are
forever answering on this kind of questions (They both are VB.Net)

microsoft.public.dotnet.languages.vb.data

(Bill is not active in this newsgroup and I did not see Paul for a while, I
don't know if he lives in the south of the US.)

I hope this helps,

Cor
Nov 21 '05 #2
Hi,

Dim null As Object = Convert.DBNull

Ken

------------------------

"ReidarT" <re****@eivon.no> wrote in message
news:OA**************@TK2MSFTNGP14.phx.gbl...
I am trying to add records to a table with a date field (access-database)
where some of the records have a date and some haven't.
I use
dim dteReturDate as Date
If IsDate(RsMem("Returdato").Value) Then
dteReturdato = RsMem("Returdato").Value
Else
dteReturdato = Null
End If
.addnew
RsMem2.AddNew
RsMem2!Returdato = dteReturdato
.Update

Problem is the Null and the debugging stops at the RsMem2!Returdato-line
regards
reidarT

Nov 21 '05 #3

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

Similar topics

2
by: www | last post by:
Hi there, I' m getting a (0x80040E2F) error, if I submit my form, with blank textboxes to my update stored procedure. The stored procedure expect values, so how can I detect if a form field was...
1
by: Scott | last post by:
In the result of a SELECT statement, how can you change cell values from NULL to BLANK? The following does NOT do it: SET fieldname = ' ' WHERE fieldname IS NULL Also, for colums with a DATE...
1
by: Joel | last post by:
Hi, How do you determine if a Date field is blank. In my Sql statement I only want records who's date field is blank (i.e. checking for only open invoices where Date_Paid = '' ...still open...
8
by: MacDermott | last post by:
I have a query, which gathers up information, which is subsequently dumped into an instance of Excel using recordsetcopy. For one of the query fields, I have written what should be a pretty...
3
by: Raterus | last post by:
Hi, I have a business object that exposes a DateTime object to my presentation layer. Usually this is filled with a valid date, but sometimes it is empty (and stored as 1/1/1900 as it is a...
0
by: Bob | last post by:
I have an Access date field bound to a text box. If I modify the text box to a different date value and update, it writes the modified value to the table. If I blank the date in the text box and...
5
by: Řyvind Isaksen | last post by:
I have a page with an optional integer-field, and one asp:calendar control. I use a stored procedure to save the data in SQL Server. When all fields contains data, the code works great! But if the...
5
by: M Skabialka | last post by:
I am creating my first Visual Studio project, an inventory database. I have created a form and used written directions to add data from a table to the form using table adapters, data sets, etc. ...
6
by: EricR | last post by:
I am trying to bcp import a text file into a SQL Server 2000 database. The text file is coming out of a java application where order information is written to the text file. Each record is on it's...
2
by: stainless | last post by:
I have a date selection field that can be blank OR set to a valid future date. I am thinking of using a datepicker field but have one issue with this. If I have a check box in the datepicker...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.