Date and oledb
Please support our VB.NET advertiser: DiscountASP.NET – 3 Months Free on VB.NET Web Hosting
![]() |
•
•
Posts: 10
Reputation:
Solved Threads: 0
I need help,i have a problem,i cant seem to insert from my vb interface to my access database...for example the access field is a fate type......how am i supposed to do it?,like if i enter my date like 24/2/08,it ll go in database,i tried my oledb.varchar,oledb.dbdate also does not work....can some1 help me out with this...everytime i use it i get error in insert into statement
What error message do you get?
Does this work in your code:
Does this work in your code:
VB.NET Syntax (Toggle Plain Text)
Dim oConn As OleDbConnection Dim oCmd As OleDbCommand Dim strSQL As String Dim myDate As Date myDate = CDate("4.10.2008") ' Use your locale date format, like "10/4/2008" strSQL = "INSERT INTO <mytable> (<my date field>) VALUES ('" & myDate & "')" oConn = New OleDbConnection("<your connectionstring") oConn.Open() oCmd = New OleDbCommand(strSQL, oConn) oCmd.ExecuteNonQuery()
Teme64 @ Windows Developer Blog
![]() |
Similar Threads
Other Threads in the VB.NET Forum
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Shopping Cart Not Working (ASP.NET)
- help me pls.. tml 10 more hours to due date..!! (ASP.NET)
- problem in javascript coding in asp page (ASP)
- SQL Query inserts junk data as well (ASP)
- conditional database query (ColdFusion)
- ASP .NET Display Random records from the database (ASP.NET)
- Access and VB (Visual Basic 4 / 5 / 6)
- Please Help!!! MOD function (ASP)
Other Threads in the VB.NET Forum
- Previous Thread: List Box help
- Next Thread: help in my linkin....
•
•
•
•
Views: 565 | Replies: 1 | Currently Viewing: 1 (0 members and 1 guests)





Linear Mode