|
-
May 8th, 2000, 07:33 PM
#1
Thread Starter
Member
I am using Access Database in my VB application.
Thare is one table which contains HireDate field which is of Date data type.This Field is optional.How can i insert a null date into it using SQL Insert Statement From VB. I am using DAO and Execute method.
-
May 9th, 2000, 12:54 AM
#2
You could either pass the Null keyword, or you could specify the fields you want to fill.
eg
with a table like this:
name:
tblContact
Fields:
ContId (Long)
ContName (Text)
ContBirthday (Date)
Insert into tblContact Values( 1, 'Frans', Null)
Or
Insert Into tblContact (ContId, ContName) Values( 1, 'Frans')
-
May 9th, 2000, 08:25 PM
#3
Hyperactive Member
Hello gorthims,
In my database programs, this allways works!
Private Sub Form_Load()
Dim DbSetting As String
Dim DB As Database
Dim RS As Recordset
DbSetting = "f:\q.mdb"
Set DB = OpenDatabase(DbSetting)
Set RS = DB.OpenRecordset("select * from personal")
RS.MoveFirst
'HireDate is type Date
RS.Edit
RS("HireDate") = Null
RS.Update
End Sub
Nice regards,
Michelle.
-
May 9th, 2000, 08:42 PM
#4
Thread Starter
Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|