Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting

Post new topic   Reply to topic
Foxpro 2.6 DBF date input fails
View previous topic :: View next topic  
Author Message
elmo
Newbie


Joined: 02 Aug 2005
Posts: 1

PostPosted: Aug 2nd, 2005 09:06 AM    Post subject: Foxpro 2.6 DBF date input fails Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic