elmo Newbie
Joined: 02 Aug 2005 Posts: 1
|
Posted: Aug 2nd, 2005 09:06 AM Post subject: Foxpro 2.6 DBF date input fails |
|
|
Hi there, can anyone shed some light on what i can do to get this working
Using Visual basic 6.0 i am trying to amend a field in a DBF called wipdate1, I am using the following code
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim insertsql As String
con.Open "DSN=Gantt;userid=;pwd="
DD = PDate.Day
MM = PDate.Month
YYYY = PDate.Year
If Len(DD) = 1 Then
DD = "0" & DD
End If
If Len(MM) = 1 Then
MM = "0" & MM
End If
Udate = YYYY & MM & DD
strsql = "update order set wipdate1=" & Udate & " where wipno=" & currwip
rs.Open strsql, con, adOpenDynamic, adLockOptimistic, adCmdText
I have tried with and without quote marks around the date
I have tried the date field in the following formats
DD/MM/YYYY
MM/DD/YYYY
DD/MM/YY
MM/DD/YY
DDMMYYYY
DDMMYY
MMDDYYYY
MMDDYY
YYYYMMDD
YYMMDD
its getting a bit stupid now
if it helps the error i get is
ODBC does not support the requested properties
I am using Microsoft ActiveX Data objects 2.6 for data access.
Thankyou |
|