| | |
date problem
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jan 2008
Posts: 3
Reputation:
Solved Threads: 0
procLicense = New SqlDataAdapter("procUpdateLicense", oConnection)
procLicense.SelectCommand.CommandType = CommandType.StoredProcedure
If num <> "" Then
procLicense.SelectCommand.Parameters.Add(New SqlParameter("@Date", SqlDbType.DateTime))
If LicenseDate.Text = "" Then
procLicense.SelectCommand.Parameters("@Date").Value = DBNull.Value
Else
procLicense.SelectCommand.Parameters("@Date").Value = CDate(LicenseDate.Text)
End If
Else
procLicense = New SqlDataAdapter("procInsertLicense", oConnection)
procLicense.SelectCommand.CommandType = CommandType.StoredProcedure
procLicense.SelectCommand.Parameters.Add(New SqlParameter("@Date", SqlDbType.DateTime))
If LicenseDate.Text = "" Then
procLicense.SelectCommand.Parameters("@Date").Value = DBNull.Value
Else
procLicense.SelectCommand.Parameters("@Date").Value = CDate(LicenseDate.Text) ' add cdate()
End If
End If
The code did not save date to database picking from datepicker(Fromat - 25 March 2008)
procLicense.SelectCommand.CommandType = CommandType.StoredProcedure
If num <> "" Then
procLicense.SelectCommand.Parameters.Add(New SqlParameter("@Date", SqlDbType.DateTime))
If LicenseDate.Text = "" Then
procLicense.SelectCommand.Parameters("@Date").Value = DBNull.Value
Else
procLicense.SelectCommand.Parameters("@Date").Value = CDate(LicenseDate.Text)
End If
Else
procLicense = New SqlDataAdapter("procInsertLicense", oConnection)
procLicense.SelectCommand.CommandType = CommandType.StoredProcedure
procLicense.SelectCommand.Parameters.Add(New SqlParameter("@Date", SqlDbType.DateTime))
If LicenseDate.Text = "" Then
procLicense.SelectCommand.Parameters("@Date").Value = DBNull.Value
Else
procLicense.SelectCommand.Parameters("@Date").Value = CDate(LicenseDate.Text) ' add cdate()
End If
End If
The code did not save date to database picking from datepicker(Fromat - 25 March 2008)
![]() |
Similar Threads
- SAS/Oracle Date Problem (Computer Science)
- Date Problem (MS SQL)
- SQL date problem (MS SQL)
- Small date problem (ASP)
- Dreamweaver MX2004 & date problem, etc. (Graphics and Multimedia)
- Date Problem (JSP)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Write concurrently to log file
- Next Thread: Edit records
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time timer urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





