VB2010 的datettimepicker无法显示sql2008日期
程序代码:
Private Sub Load_Project(ByVal cJobNo As String, ByVal nFlag As Integer) Dim lnComboboxIndex As Integer Dim lcSQL As String 'nFlag => 0-Edit 1-Copy Record lcSQL = " SELECT * FROM [projreg] WHERE jobno = " & "'" & cJobNo & "'" frmMain.objDB.QueryRecord(lcSQL) While frmMain.objDB.oQuery.Read() If frmMain.objDB.oQuery.HasRows And Not frmMain.objDB.oQuery.IsDBNull(0) Then If nFlag = 0 Then nID = frmMain.objDB.oQuery.GetInt32(0) txtJobNumber.Text = frmMain.objDB.oQuery.GetString(1) dtpDateRegister.Value = CDate(frmMain.objDB.oQuery.toDateTime(29)) End If End If End While以上我我的编程. 因为我是新手, 所以有很多东西不太明白.
我想在VB2010 里面从sql2008里的日期显示在datettimepicker.
请问该如何写呢?
菜鸟在线等待...
谢谢..