| | |
Date and oledb
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2008
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
- 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....
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2005 2008 access account arithmetic array assignment basic binary bing box button buttons center check code component connectionstring convert cpu crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist editvb.net excel file-dialog firewall folder ftp hardcopy image images insert isnumericfuntioncall login math memory mobile ms mssqlbackend mysql navigate net networking opacity output passingparameters peertopeervideostreaming picturebox1 port printpreview problemwithinstallation project record reports" reuse save savedialog serial soap storedprocedure string tcp temp text textbox timer toolbox trim update updown useraccounts usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view visual visualbasic visualbasic.net visualstudio web wpf





